-
Dear Friends,
I have Datagrid "dbd" and recordset "rst", i want to delete some records that user selected from Datagrid by using the following code;
Private Sub Command1_Click()
Dim varBmk As Variant
For Each varBmk In dbd.SelBookmarks
rst.Bookmark = varBmk
rst.Delete
dbd.Refresh
Next
End Sub
it works till rst.delete command and an error is generated which is run time error -2147467259
"Insufficient base table information for updating or refreshing."
Could anybody tell me what it is or how can i do the same work by something else...
PS: My connection code is
With cnn
.CursorLocation = adUseClient
.Open "Hisse": End With
rst.Open sql, cnn, adOpenDynamic, adLockOptimistic
Thanks,
-
Possibly?
I have no clue what I am talking about, but is it possible that the AllowUpdate and AllowDelete prorperties on your Datagrid are set to false?
-
Thanks Ovid,
But unfortunately that's not case all of the allow properties were set to true. Is there any other reply?Please help!
-
have you specified which table is to be the source of the recordset?
-
Thanks Pardede,
But there is no a problem in sql statement it is like this;
sql = "SELECT * FROM Hisseler WHERE HT_HNo = " + Str(txtHNo) + " ORDER BY HT_TNo , HT_KupurIlk ;"
any other idea?