Row cannot be located for updating access

I'm attempting to update a recordset and I'm getting this error "-2147217864: Row cannot be located for updating.

row cannot be located for updating access-5row cannot be located for updating access-42

It appeared after I changed data in a disconnected recordset, updated the database, changed data in the recordset again, and then tried another update.

The second update failed because of what I believe is a Microsoft BUG, if you track the underlying values of the fields over the course of the updates, after the first update, ADO 2.5 fails to resync the underlying field values.

Hence on the second update, the ADO engine will always fail to locate the row to update, because the underlying values (which is uses in the update statement) have become out of sync.

The reason you code works with numeric values is because ADO uses the underlying values in the update statements for 'comparable' fields only.

A var char field cannot be efficiently used in comparisons, so the underlying value is ignored.

My workaround was to manually resync the recordset after every update Hope this helps. I ran into a similar problem a while back when doing an update. The second update failed because of what I believe is a Microsoft BUG, if you track the underlying values of the fields in the recordset over the course of the updates, after the first update, ADO 2.5 fails to resync the underlying field values. The reason your code fails with numeric values is because ADO uses the underlying values in the update statements for 'comparable' fields only. My workaround was to manually resync the recordset after every update Hope this helps. Enterprise Manager: Row cannot be located for updating Subject: Enterprise Manager: Row cannot be located for updating Hi there, I just made a table that includes three calculated fields; their value depends on what is entered into other cells of the same row. Using the Enterprise Manager, when I try to change a value of such a calculated field I get the message "Cannot edit this cell" which is good of course. However, when I try to edit one of the other cells I get the message "Row cannot be located for updating. Some values may have been changed since it was last read".

Tags: , ,