Re: ADO UpdateBatch Problems
From: Dave Blake (barnswood_at_hotmail.com)
Date: 08/31/04
- Next message: Eric Hill: "Re: Plan to built a huge enterprise application"
- Next in thread: Brian Bushay TeamB: "Re: ADO UpdateBatch Problems"
- Maybe reply: Brian Bushay TeamB: "Re: ADO UpdateBatch Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 Aug 2004 18:52:36 +0100
> 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 can't find anywhere I can hook this
> in...
>
Microsoft Knowledge Base Article 190727 might be of help. More generally
http://www.adoanywhere.com/ado_faq/locking/ is a good overview.
I think you need to set update criteria to gain the control you require.
UpdateBatch collects a number of updates together to apply at one time, but
I'm not sure it checks for concurrent changes etc. Also Del is right, the
Jet OLE DB data provider (I assume you are using) does not necessarily raise
obvious exceptions. And remember that Jet does cached reads and lazy
writes - a separate connection will not see changes *immediately* after post
or commit.
But, experts out there, a good example of handling concurrency with ADO and
Delphi would be jolly nice!
Dave
- Next message: Eric Hill: "Re: Plan to built a huge enterprise application"
- Next in thread: Brian Bushay TeamB: "Re: ADO UpdateBatch Problems"
- Maybe reply: Brian Bushay TeamB: "Re: ADO UpdateBatch Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|