Discussion Locked

ADO in Access 2000 Class Module

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a data class that includes 2 save functions, saveR (report) and saveRD (reportdetails). the save routine uses the ADODB recordset to set the values followed by an .update at the end. I call the class from a form. When it runs the code it willwrite the first 6-10 fields to the recordset then return a -2147217887 'Errors Occured' Message. If put a break point at the beginning of the code then F8 through it, it works fines but if I hit F5 or let it run automatically, I get the error. Help.

3 replies

by gharrisjr

Thanks for the info but...
The info was related to SQL 7 & I am using Access for the backend. I did try
setting the cursor location on the recordsets to clientside and now I receive a different message when the 2nd update is performed: "The specified row could not be located for updating: Some values may have been changed since it was last read." the code is something like
.field = value
.field2 = value2
.update
.field3 = value3
.field4 = value4
.update
etc
The 1st update works and the others don't. I added the multiple .updates because it would bomb after several lines of .field=value. If I step through it manually (without specifying the cursor location) - it works.

This discussion is closed to new replies.