Results 1 to 5 of 5

Thread: Problem with Datagrid

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49
    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,

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Location
    Omaha, NE, USA
    Posts
    28

    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?
    - Ovid -

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49
    Thanks Ovid,

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






  4. #4
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    have you specified which table is to be the source of the recordset?

  5. #5

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Turkey
    Posts
    49
    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?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width