🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2999

ADO Problem - "Row cannot be located ... "

#2999
From: Ian Hood
Date: Tue, 21 Jan 2003 02:41
28 lines
1957 bytes
Hello all.

I am having an ADO problem in the guise of frequent EOleExceptions with
message 'Row
cannot be located for updating. Some values may have been changed since it
was last read'.

I've narrowed the problem to the fact that the default for AdoExpress
datasets is to locate the record to update on all field values
(adCriteriaUpdCols). So if you change a row in
one dataset all the field values no longer match when you try to update it
from the second dataset. That is why I keep getting the fail messages.  I've
also seen the problem even
if there is only one dataset open!!

To solve this problem, I have to set the 'Update Criteria' dynamic property
to adCriteriaKey, which tells the dataset to use only the Primary Key to
locate the record.

In Delpi, this is done as follows:

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

My problem is working out how to implement the above line in C++.

Any help in this matter will be much appreciated.

Ian.
Technical Details
Message-ID: <3e2cb1ca@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e558d2dad24464a,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-01-20 18:40:05 PST
Reply-To: "Ian Hood" <ian@ravar.net>
From: "Ian Hood" <ian@ravar.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADO Problem - "Row cannot be located ... "
Date: Tue, 21 Jan 2003 12:41:55 +1000
Lines: 30
Organization: Ravar Pty Ltd
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 203.51.232.204
Message-ID: <3e2cb1ca@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1043116490 203.51.232.204 (20 Jan 2003 18:34:50 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail