Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Row cannot be located for updating. Some values may have been changed since it was last read.

930 views
Skip to first unread message

samratdhamale

unread,
Feb 13, 2004, 4:09:01 AM2/13/04
to

hi , I use oracle database and DElphi 5. In TAdoquery I query fields from clietmaster,companymaser. I show it in tdbgrid. while editing i ery often get error.Row cannot be located for updating. Some values may have been changed since it was last read.

Brian Bushay TeamB

unread,
Feb 13, 2004, 10:08:10 PM2/13/04
to

>hi , I use oracle database and DElphi 5. In TAdoquery I query fields from clietmaster,companymaser. I show it in tdbgrid. while editing i ery often get error.Row cannot be located for updating. Some values may have been changed since it was last read.
When ADO updates a record in the databaes it must first find that record. The
default is to use all the field values from when the record was last refreshed.
If using those fields no matching record can be found on the server you get the
error message you refer to.
This can happen if you are setting field values in a stored procedure when the
record is posted.
You can change the behavior of how ADO finds a record to update using the
Update Criteria property

ADODataSet1.Properties['Update Criteria'].value :=adCriteriaKey;

Your choices are adCriteriaKey, adCriteriaAllCols (BDE's default),
adCriteriaUpdCols (ADO's default) and adCriteriaTimeStamp.

http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q190727&GSSNB=1
--
Brian Bushay (TeamB)
Bbu...@NMPLS.com

Glenn De Tollenaere

unread,
Feb 19, 2004, 9:48:59 AM2/19/04
to
Hi all,

I have a problem using TADODataSet. Sometimes editing my data in a grid, I
get an error described above:


"Row cannot be located for updating. Some values may have been changed since

it was last read.".

For instance, this happens after I have inserted a new record, saved it to
the database and then try to edit it.

Does anybody have a clue of why this is happening and how it can be easily
solved ?
Is this a setting or any option in the TADOConnection ?

Any help appreciated
Glenn


Brian Bushay TeamB

unread,
Feb 19, 2004, 11:22:19 PM2/19/04
to

>I have a problem using TADODataSet. Sometimes editing my data in a grid, I
>get an error described above:
>"Row cannot be located for updating. Some values may have been changed since
>it was last read.".
>
>For instance, this happens after I have inserted a new record, saved it to
>the database and then try to edit it.
>
>Does anybody have a clue of why this is happening.
This happens because ADO needs to find the record you are editing in your
database to make a change to it. If it can't find the record this error is
generated.
ADO default is to use all the field values from before the record was edited to
match fields to a record in the database. If you have fields that are set by
triggers or defaults in the database the records in your dataset will not match
server records


> and how it can be easily
>solved ?

You can change the
ADO 'Update Criteria' dynamic property to something that does not use all fields

ADODataSet1.Properties['Update Criteria'].value :=adCriteriaKey;

Your choices are adCriteriaKey, adCriteriaAllCols (BDE's default),
adCriteriaUpdCols (ADO's default) and adCriteriaTimeStamp.

This property should be should be set after the dataset is opened.

http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q190727&GSSNB=1

>Is this a setting or any option in the TADOConnection ?

No

Succ Ducc

unread,
Sep 13, 2021, 6:50:55 AM9/13/21
to
Me in 2021 who is still having this problem 😶
0 new messages