Darn Row Cannot be located for updating error
From: Bill N (bnielsen_at_cpumanagement.com)
Date: 09/21/04
- Next message: George Kvasha: "Re: DBGrid Selected Rows"
- Previous message: PlutuDev: "Re: Share ADO Connection from Exe TO DLL"
- Next in thread: Kevin Frevert: "Re: Darn Row Cannot be located for updating error"
- Reply: Kevin Frevert: "Re: Darn Row Cannot be located for updating error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Sep 2004 08:57:30 -0700
I'm using D6 Ent SP2 --Client/Server App with MS SQL Server 2000
I'm trying to update some fields in a TADODataset whose cursortype is
ctDynamic.
The code is below:
=====================================================================
with qry do
begin
Connection := Conn;
CursorType := ctDynamic;
{...keep it simple for this example}
s := MASTER_SQL;
CommandText := Format(s, [quotedStr(FGroupBenefit.PolicyID)]);
Open;
//if record with Policy not found -- add new one else edit
current
if Eof then
Insert
else
Edit;
//iterate through all sets to see if selected
//SB is an enumerated type
for SB := Low(SB) to High(SB) do
if SB in FSelBenefitOptns then
FieldByName(getFieldName(SB)).AsString := 'T'
else
FieldByName(getFieldName(SB)).AsString := 'F';
Post;
=======================================================================
I get this message when trying to post:
////////////////////////////////////////////////////////////////////////
EDatabaseError--Row cannot be located for updating. Some values may
have been changed since it was last read
////////////////////////////////////////////////////////////////////////
I've read somewhere (probably this newsgroup) that Triggers on the
table can cause this error message to appear. This table has triggers
when setting these fields to 'F' (false). If setting the field to 'F'
causes the error message, then how can I set the field to 'F'. Do I
have to write an update query?
Thanks,
Bill N
- Next message: George Kvasha: "Re: DBGrid Selected Rows"
- Previous message: PlutuDev: "Re: Share ADO Connection from Exe TO DLL"
- Next in thread: Kevin Frevert: "Re: Darn Row Cannot be located for updating error"
- Reply: Kevin Frevert: "Re: Darn Row Cannot be located for updating error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|