Re: "Last write wins" concurrency in ADO.NET
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Mon, 12 Sep 2005 10:17:07 -0700
No there is no settable property as there is in ADO classic, (as I said in
an earlier post today) the DML commands that ADO.NET's CommandBuilder (that
can be called manually or called by the VS wizards) use a "check all
columns" concurrency approach.
You'll need to write these UPDATE commands yourself and set the
UpdateCommand CommandText to these hand-tuned SQL statements.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Oenone" <oenone@xxxxxxxxxxx> wrote in message
news:eu5duF6tFHA.1472@xxxxxxxxxxxxxxxxxxxxxxx
> I'm working on a VB.NET app which uses ADO.NET to interact with a
> database.
>
> Currently I have a problem with concurrent updates due to the optimistic
> locking used by ADO.NET. I wish to be able to modify the data updates so
> that they only check the Primary Key columns when updating the database
> (as described in option 1 here:
> http://www.eggheadcafe.com/articles/20050719.asp) in order to get "last
> write wins" functionality, instead of checking all of the data columns (as
> ADO.NET appears to do by default).
>
> Is there a property of the DataAdapter or Command objects that I can
> modify to implement this? Or do I have to build the Command SQL myself?
>
> My thanks in advance,
>
> --
>
> (O)enone
>
.
- Follow-Ups:
- Re: "Last write wins" concurrency in ADO.NET
- From: Sahil Malik [MVP]
- Re: "Last write wins" concurrency in ADO.NET
- References:
- "Last write wins" concurrency in ADO.NET
- From: Oenone
- "Last write wins" concurrency in ADO.NET
- Prev by Date: Re: Getting Autoincrement ID in ADO.NET
- Next by Date: Re: "Last write wins" concurrency in ADO.NET
- Previous by thread: Re: "Last write wins" concurrency in ADO.NET
- Next by thread: Re: "Last write wins" concurrency in ADO.NET
- Index(es):
Relevant Pages
|