Row cannot be located for updating access

The returned message is "Row cannot be located for updating.

Some values may have been changed since it was last read. It put only some default values on other not rilevant columns.

you said you want to update row but updated_row_count returned was 0 (as there was nothing to update).

This occurs since first option in DSN config ("Return Matching Rows") is not checked even we say clearly it should be in manual.

Description: When I try to update a record but there are no changes in the record the update fails with the following error text: "Row cannot be located for updating. Update() End With If the information in the database is the same as what's in the update then the error occurs. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Left on it's own, *Access* forms rather insane update queries depending on *all* fields values, timestamps and who knows what.

Some values may have been changed since it was last read." As far as I can see there are two work-arounds: 1. First check if there are changes in the record How to repeat: rs. Conn, Cursor Type Open Keyset, Lock Type Lock Pessimistic) With rs . Same problem here, My SQL ODBC Driver 5.1 Access 2007, vba code .update doesn't work when the value is already in the table. Please try to tell Access how to form UPDATE queries as described above: rs Customers. Value = ad Criteria Key and catch any error it might throw.

Next use code similar to mine below to create the objects.'' 1. Open "Provider=SQEDB; Server=S1; Database=my DB","sa"rs Obj. Open "Select * From tbl", con Obj, ad Open Static, ad Lock Read Only Set datagrid. Make sure you reference the latest version of 'Microsoft Active X Data Objects' in your project. Execute "Delete From tbl Where id In (list Of Ids)"rs Obj.requerydatagrid.refresh And that should do it. Also if this is helpful, please mark the post as so.-Matt True. This is exactly as described in MS Bulletin Q300586, BTW. I tried to give your post the star it deserved, but the system bombed on post, so I'll try to acknowledge you properly later. Neither the Date Time nor Document fields in my database are unique in and of themselves, and since Access requires a primary key for a table, I have created one by sequentially numbering the records and putting the record number in a field called "Index." When a new record is added, it's just given an Index value that's incremented 1 above the last record.

As of second time -Rob, Klaus, as stated in original report (Bug#7160), I will really need ODBC trace from Driver Manager to see what's actually happening. As for error being thrown, it is rather straight forward...

COM The error means that the values of the fields of a record in the database are not the same as the original values in your clientside record.

Trying to do an efficient delete of multiple records in an ADO recordset bound to a Data Grid control, and populated from an MS Access 2000 database. This will open and set everything'Dim con Obj As New ADODB. Data Source = rs Objdatagrid.refresh'''''''''''''''''''''''' 2. I'd like to sort on two other fields, Date Time and Document, which taken together form unique records, and then renumber the Index field.2) Then I'd like to do the equivalent of Access' "Compact and repair database" tool. Again thanks, Dan Well, for the compacting you can use JRO (Microsoft Jet And Replication Objects). So what I want to do is simply renumber the records after deleting the old ones. Trying to do the same thing with the data-bound control produces the same error on update that deleting a record did.

Sorry I dont have any sample code, I did something similar to this in my last position and dont have it handy.-Matt Matt, You may be onto something here. .although then my question would be how to structure the Delete statement.

This will solve the problem of having to refresh on every delete, you will only have to do it after every user request.

Leave a Reply