Groups | Blog | Home
all groups > dotnet ado.net > may 2007 >

dotnet ado.net : SqlCommandBuilder and optimistic concurrency


KShvats
5/21/2007 12:00:00 AM
Hey ya,

Using .NET 2.0 and SqlCommandBuilder, say I have a customer row, with an
address and name fields. I need 2 different clients to be able to change
1 field each and not get ConcurencyExeption on 2nd Update(). Is it
possible to do?

Miha Markic
5/21/2007 12:00:00 AM
Why don't you craft your SQL statements manually instead of using builder?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

[quoted text, click to view]
Kerry Moorman
5/21/2007 7:19:00 AM
KShvats,

You can use the SQLCommandBuilder's ConflictOption property to specify how
to deal with concurrency violations.

However, the choices may not be fine-grained enough for your needs. In that
case I think you will need to supply your own SQL statements for Insert,
Update and Delete.

Kerry Moorman


[quoted text, click to view]
KShvats
5/21/2007 3:16:46 PM
Becouse it saves a lot of time, I've got absolutely no performance
problems and a lot of things to do.

[quoted text, click to view]
AddThis Social Bookmark Button