Results 1 to 3 of 3

Thread: Deleting Records ADO

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Dublin
    Posts
    5

    Post

    I use the filter property to go to my record
    i then use the delete method
    However I can still see the record in my bound controls and I am unable to move to another record in the set
    I get an Hrow error

    Can someone throw some light on this problem please


  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Post

    You need to refresh your record set after a delete. You can't move to another record because your filter condition only returns one record.

  3. #3
    New Member
    Join Date
    Jan 2000
    Location
    Toronto,Canada
    Posts
    7

    Post

    Originally posted by Darrenw:
    I use the filter property to go to my record
    i then use the delete method
    However I can still see the record in my bound controls and I am unable to move to another record in the set
    I get an Hrow error

    Can someone throw some light on this problem please
    Instead of using the filter why not not use the find method
    ex:
    Dim varbookmarkd As Variant
    data1.recordset.find "id like '" + DataCombo1.Text + "*'"

    after the find goes to the record bookmark it
    then delete the record. this way your guarenteed the currently bookmarked record is indeed the one to delete.
    'bookmark this record
    varbookmarkd = DE1.rscmd1.Bookmark
    'go to beg of table
    DE1.rscmd1.MoveFirst
    'go to the bookmarked record
    DE1.rscmd1.Bookmark = varbookmarkd
    ' now delete it
    DE1.rscmd1.Delete
    'move to last record
    de1.rscmd1.movelast
    de1.rscmd1.movefirst
    ' the moves are to counteract with rebinding issues in ado 2.1
    I hope this helps

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