Re: ADO UpdateBatch Problems

From: Brian Bushay TeamB (BBushay_at_Nmpls.com)
Date: 09/01/04


Date: Tue, 31 Aug 2004 21:05:08 -0500


>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


Relevant Pages

  • UpdateBatch or Update w/Stored Procedure (Database via Wireless Network)
    ... Server 2000 database. ... across the wireless network while the stored procedure is executed. ... performance hit at the closing of a form by doing UpdateBatch via ADO, ...
    (microsoft.public.vb.database.ado)
  • Re: Performance comparison on Update vs. UpdateBatch - record by record
    ... then UpdateBatch first calls Update and then ... records to the database. ... performance of updating. ... one user will change a record before changes made by another user editing ...
    (microsoft.public.data.ado)
  • Re: Updates not applied when using cloned datasets
    ... Then execute the UpdateBatch and then reconnect the detail to the master. ... I have three TADODatasets, DsetHeadings is a master ... > UpdateBatch will not work (no changes sent to the database) on ...
    (borland.public.delphi.database.ado)
  • Re: Stale Data
    ... Do you re-connect your recordset to the database before calling UpdateBatch? ... > thus how i can make sure that i try to delete the stale data ...
    (microsoft.public.data.ado)