Row cannot be located for updating vb6 mysql
Connection String = "DRIVER=;" & "SERVER=" & mstr Server Name & ";" & " DATABASE=" & mstr This Database & ";" & "UID=root; PWD=" & mstr This Password & "; OPTION=3" mconn.
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.
I posted the following under mysql, but was directed here, hopefully someone can assist me When trying to update a table i get the following error on the .update command: Row cannot be located for updating.
Some values may have been changed since it was last read.
dont know whether this is a vb6 or odbc bug - see the mysql forum below for a discussion on it not sure if you found a solution yourself, but i managed to get around this by: dim a boolean.check to see if the value in the table is different from the new value (say on your form), if they are different, set the boolean to the bottom of my code, where its quite lengthy, if the boolean is true, then perform the .update, else cancel the connection with .cancel.
The reason for the error is that if the value hasn't changed, then mysql doesnt want to perform the update.
So I have a reason for wanting to iterate through the table. Thanks, John Brown You should try selecting the Return Matching Rows option in the DSN configuration dialog, or specify OPTION=2, as the connection parameter.
The value of int TF is actually determined by another table look-up.
Open("SELECT * FROM testbug11970 where Id = 1", p_conn, Cursor Type Open Forward Only, Lock Type Lock Optimistic) p_rs.
Some values may have been changed since it was last read." The values looked up have not changed, the only change might be price or quantity.