Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    deleting records in a recordset (Access2000)

    I have the following codes in my program to delete a set of records in a recordset:

    Do While rstDetail.EOF <> True
    rstDetail.Delete
    rstDetail.MoveNext
    Loop

    They work fine on most machines that I tested but when I run the program on a Compaq Proliant 800 machine, it might delete 2 out of 300 records only. I copy the entire program on other machines and it works perfectly. I wonder if there is anything on my machine setting that needs to be changed.

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: deleting records in a recordset (Access2000)

    Why are you deleting the records one by one instead of just executing a delete query on all of them? The latter would be much faster.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: deleting records in a recordset (Access2000)

    I was trying to find out if a particular computer has problem in deleting records and thus wrote this short program to do so. In fact the Compaq Proliant 800 (312MB RAM PIII 550) is the only one that could not completely delete all the records whereas a Compaq DeskPro EN (PIII733) deletes them no problem. The delete query works fine on both but shouldn't the program work the same on both machines?

    Thanks

  4. #4
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: deleting records in a recordset (Access2000)

    I suspect that it is all due to the version of ADO that I used. I used ADO 2.1 and had that problem but after I upgraded to ADO 2.5 on the same machine, everything works fine!

Posting Permissions

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