Re: "Last write wins" concurrency in ADO.NET

Tech-Archive recommends: Speed Up your PC by fixing your registry



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
>


.



Relevant Pages

  • Re: "Last write wins" concurrency in ADO.NET
    ... William (Bill) Vaughn ... >> an earlier post today) the DML commands that ADO.NET's CommandBuilder ... >> You'll need to write these UPDATE commands yourself and set the ... >>> that they only check the Primary Key columns when updating the database ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: data adapter and sqlcommand
    ... That commandbuilder builds the commands automaticly, ... insert, delete and update commands. ... > From Agnes ... >> dim cmb as new SQLCommandbuilder ...
    (microsoft.public.dotnet.languages.vb)
  • Re: "Last write wins" concurrency in ADO.NET
    ... > No there is no settable property as there is in ADO classic, ... > an earlier post today) the DML commands that ADO.NET's CommandBuilder ... > You'll need to write these UPDATE commands yourself and set the ... > Microsoft MVP ...
    (microsoft.public.dotnet.framework.adonet)