Row can not be located for updating

Rated 3.92/5 based on 942 customer reviews

Hello, I have a legacy application written in VB6 and using Oracle OLEDB Provider (version 9 and updated to the last ones from oracle site) I've a problem during insert of a record using recordset method (Add New).

The returned message is "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.

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

row can not be located for updating-85

row can not be located for updating-5

row can not be located for updating-45

If I set it to Integer, I cannot set the relationship in Access.

The number one offender is the lack of a primary key in your data when you try to post it back to the DB. I have been sporadically getting a "Row cannot be located for updating" error. In this instance, I am just building a desktop application. To do this it must be able to find the record in your database that corresponds to the record you are editing.

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.

Since then inserting a new row gives the error "Row cannot be located for updating".

I know this has to do with ADO trying to locate a row by specifying each field it knows about, as in "select * from customer where [Name]="Me" and [Address]="Someplace" and so on for each field. In my application, I use a t Ado Data Set with a simple Command Text like "select * from Customer".

Leave a Reply