PDA

Click to See Complete Forum and Search --> : Problem with Datagrid


leontro
Jun 25th, 2000, 09:51 PM
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,

Ovid
Jun 26th, 2000, 02:48 AM
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?

leontro
Jun 26th, 2000, 02:35 PM
Thanks Ovid,

But unfortunately that's not case all of the allow properties were set to true. Is there any other reply?Please help!

pardede
Jun 26th, 2000, 09:39 PM
have you specified which table is to be the source of the recordset?

leontro
Jun 27th, 2000, 04:27 PM
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?