Row can not be located for updating

EDatabase Error--Row cannot be located for updating.Some values may have been changed since it was last read ******ADO Errors******* *Error Number: -2147217864 * *Source: Microsoft Cursor Engine *Description: Row cannot be located for updating.Deleting some rows may occur if there is no primary key, because ADO execute query: DELETE FROM [Some Table] WHERE .... Deleting some rows may occur if there is no primary key, because ADO execute query: DELETE FROM [Some Table] WHERE .... Deleting some rows may occur if there is no primary key, because ADO execute query: DELETE FROM [Some Table] WHERE .... Detail Table has an autoincrement field as primary key. The local row is now deleted" and actually the row seems to disappear.If there is no primary key, WHERE may select some rows. If there is no primary key, WHERE may select some rows. If there is no primary key, WHERE may select some rows. But If a close the de and re-launch it the row is there, with the proper ID value! If I delete or change the record I get the message "Row cannot be located for updating.The insert/update trigger pulls information from other tables and populates some fields of the table being inserted/updated which makes for ADO to not being able to find the just inserted record back.The solution I was hoping to find was to inform ADO which field(s) are the key to the table. "Brian Bushay Team B" I'm using Delphi 6 Enterprise with SP2.

If you dont have a primary key, then the db manager tries to figure out which row should be updated by seeing if he can find one that looks much like the one that you just changed in the query object. I am not able to reproduce it, although it occurs most often when I am trying to delete a record. The error message you are getting indicates that ADO can't find the record to be deleted.

2004-01-06 AM delphi88 First of all best wishes to everyone. In my application, I use a t Ado Data Set with a simple Command Text like "select * from Customer".

Recently added an insert/update trigger to a table in SQL Server to populate some fields from a 2nd table.

I had same problem with SQL Server but i solved putting into the trigger SET NOCOUNT ON.

I think problem is related to the fact that ADO tries to calculate number of affected rows and for doing that it use a where clause built on the changed columns but using values it had on the client.

Leave a Reply