Re: "Row cannot be located for updating"
- From: "Man Utd" <alanpltseNOSPAM@xxxxxxxxxxxx>
- Date: Wed, 3 Aug 2005 16:13:07 +1000
What unit should I include to reference the adCriteriaKey ?
Because I got undeclared identifier.
"Brian Bushay TeamB" <BBushay@xxxxxxxxx> wrote in message
news:pshv219g8pr6amif0ismamjfiorhg9sb82@xxxxxxxxxx
> >When I use my program to create and save a record, it's working fine, but
if
> >I immediately do other modifications (using auto-edit mode), I got the
> >following error when applying the changes:
> >"Row cannot be located for updating. Some values have been changed since
it
> >was last read".
> >
> >I use Delphi 7 (build 8.1), ADO components (with the MS-Jet driver and
> >TADOTable), MSAccess 2002 (with a database using a 2000 format), and
> >WindowsXP (SP1).
> >
> >All my tables have primary keys based on the Access Autoincrement type
> >The tables have some master-detail links, but the problem occurs if the
> >change is made on a master or a detail table.
> >I post the changes from my master table first, then the details one.
> >I have no problem if I reload the record before I made the changes.
>
> The error means that the values of the fields of a record in the database
are
> not the same as the original values in your clientside record.
> The default for Borland's ADO components is to use all field values when
> locating the record to be updated.
> You can change this to just use the key fields by changing the Update
Criteria
> property.
>
> ADODataSet1.Properties['Update Criteria'].value :=adCriteriaKey;
>
> Your choices are adCriteriaKey, adCriteriaAllCols (BDE's default),
> adCriteriaUpdCols (ADO's default) and adCriteriaTimeStamp. Search the
> Platform SDK for more details.
>
> You should set this property in the BeforeUpdate and BeforeDelete events.
> http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q190727&GSSNB=1
>
> Your other option would be to resync each record after it is posted
>
>
> --
> Brian Bushay (TeamB)
> Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: "Row cannot be located for updating"
- From: Brian Bushay TeamB
- Re: "Row cannot be located for updating"
- Prev by Date: Re: "Row cannot be located for updating"
- Next by Date: OleVariant
- Previous by thread: Re: "Row cannot be located for updating"
- Next by thread: Re: "Row cannot be located for updating"
- Index(es):
Relevant Pages
|