Help on resolving record conflicts with ADO



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


.



Relevant Pages

  • Re: Row cannot be located for updating....
    ... Delphi5 ADO "Row cannot be located for updating" ... I've got an integer as a primary key (apparently dates and floating ... So I set pfInKey and pfInWhere to be true ...
    (borland.public.delphi.database.ado)
  • Re: Give user index grants Oracle 8/9i
    ... I can see that the table's constraints are ... and the app queries tables using synonyms via ADO. ... The primary key in ADO is denoted by the "KEYCOLUMN" property of the ...
    (comp.databases.oracle.server)
  • Re: Row cannot be located for updating
    ... Do you have primary key in every table affected by delete? ... > way to set the SQL generation to just use the key? ... >> database. ... >> The error message you are getting indicates that ADO can not find the ...
    (borland.public.delphi.database.ado)
  • Re: Give user index grants Oracle 8/9i
    ... I can see that the table's constraints are ... and the app queries tables using synonyms via ADO. ... The primary key in ADO is denoted by the "KEYCOLUMN" property of the ...
    (comp.databases.oracle.server)
  • Re: Give user index grants Oracle 8/9i
    ... available to a non-schema owner through ALL_INDEXES. ... and the app queries tables using synonyms via ADO. ... The primary key in ADO is denoted by the "KEYCOLUMN" property of the ...
    (comp.databases.oracle.server)