Help on resolving record conflicts with ADO
- From: "Bill Hicks" <waylien_no_spam@xxxxxxxxx>
- Date: Thu, 23 Feb 2006 16:16:30 +0800
I am using Delphi 7, SQL2000, ADO.
I am trying to find a clean way to resolve update conflicts between users
and am stuck. I have a SQL table that has a primary key. If a user
attempts to update a record that's already been updated by another user, the
OnPostError event fires and allows me to handle the conflict. So far so
good. Now, if I try to run the following code because the user has choosen
to overwrite the other users changes, I run into the same OnPostError as
soon as the retry occurs. It seems as though there is not enough
information to complete the update.
TAdoDataset(DataSet).UpdateCursorPos;
TAdoDataset(DataSet).Properties['Update Criteria'].Value :=
adCriteriaKey;
TAdoDataset(DataSet).RecordSet.Resync(adAffectCurrent,
adResyncUnderlyingValues);
Action := daRetry;
I thought that setting ['Update Criteria'].Value := adCriteriaKey was going
to allow me to use just the key field to make the update, but it seems like
ADO still cannot locate the record in question.
Thanks in advance.
Bill Hicks
.
- Follow-Ups:
- Re: Help on resolving record conflicts with ADO
- From: Bill Hicks
- Re: Help on resolving record conflicts with ADO
- From: Steve Zimmelman
- Re: Help on resolving record conflicts with ADO
- Prev by Date: Re: ADO and TCPIP Connections
- Next by Date: Currency Datatype for Packed Record Bug in Delphi 7?
- Previous by thread: ADO and TCPIP Connections
- Next by thread: Re: Help on resolving record conflicts with ADO
- Index(es):
Relevant Pages
|