|
-
June 15th, 2001, 12:38 PM
#1
Deleting records in a recordset
Hey everyone, I'm trying to delete all the records in a table using a while loop. When I executed the following code it deletes two records (out of 300) and immediately encounters EOF and exits the loop. I'm using ado...and I can't figure out why this isn't working.
set rsPic = new ADODB.Recordset
rsPic.Open "SELECT * FROM [PIC]", adCnGLC, adOpenDynamic, adLockOptimistic, _
adCmdText
If rsPic.BOF <> true then
rsPic.MoveFirst
Do While (Not rsPic.EOF)
rsPic.Delete
rsPic.MoveNext
DoEvents
Loop
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|