Re: ADO UpdateBatch Problems
From: Scott Meikle (scottm_at_isoplanNOSPAM.co.uk)
Date: 09/01/04
- Next message: Stephan Blind: "ADO, Locate and Access...."
- Previous message: Cengis: "Re: TAdoQuery parameters & empty strings"
- In reply to: Brian Bushay TeamB: "Re: ADO UpdateBatch Problems"
- Next in thread: Del Murray: "Re: ADO UpdateBatch Problems"
- Reply: Del Murray: "Re: ADO UpdateBatch Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 1 Sep 2004 09:26:32 +0100
Hello all,
Many thanks to everyone for your replies. I dug into the code a bit further
and I found
that there was still old code from the days when the application didn't
operate in batch mode
being called after the dataset was opened where the ADO update criteria
property for the
dataset was set to adCriteriaKey - this was throwing out any detection of
concurrent user
edits. After removing this and reverting to the default settings, I now get
the "Row cannot
be located..." exception as predicted.
Thanks again,
Scott
"Brian Bushay TeamB" <BBushay@Nmpls.com> wrote in message
news:ofaaj01694g5a4one78gcr1v32e5g8q5h9@4ax.com...
>
> >I'm working on an application using Delphi 7 with ADO disconnected
datasets
> >in batch update mode with an optimistic locking strategy, sitting on top
of
> >an
> >Access 2000 database. The problem that I have is in trying to handle
> >concurrency
> >errors where two people are editing the same record - calls to
UpdateBatch
> >don't
> >seem to generate any exceptions when record has been changed by another
> >user,
> >with the effect that if there are two edits of the same field, the second
> >users changes
> >are always the ones that are posted - I would much rather give the user
the
> >opportunity to merge or cancel but I
>
> I just did a quick test of this using the NorthWind sample database
> I used a TadoDataset ComandText = Select * from Customers
> and LockType = ltBatchOptomisic
> no other settings changed from the default values.
> If I change a record in the application then change it directly in the
table
> using Access then UpdateBatch I get the appropriate error that the row can
not
> be located for updating.
> --
> Brian Bushay (TeamB)
> Bbushay@NMPLS.com
- Next message: Stephan Blind: "ADO, Locate and Access...."
- Previous message: Cengis: "Re: TAdoQuery parameters & empty strings"
- In reply to: Brian Bushay TeamB: "Re: ADO UpdateBatch Problems"
- Next in thread: Del Murray: "Re: ADO UpdateBatch Problems"
- Reply: Del Murray: "Re: ADO UpdateBatch Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]