Home All Groups Group Topic Archive Search About
Author
11 Apr 2007 7:09 AM
Archana
Hi all,

I want to handle concurrency issue when 2 user try to update same
record.

What i want is if user1 and user2 are accessing same record and user2
has updated same record then when user1 tries to update that record he
should able to update it. Which is not happening currently.

Can anyone tell me what should i do?

thanks in advance.
Author
11 Apr 2007 9:45 AM
Miha Markic
I won't question whether what you are doing is good or bad.
But if you want to overwrite data you might remove WHERE part of
UPDATE/DELETE adapter's commands.

--
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/

Show quoteHide quote
"Archana" <trialproduct2***@yahoo.com> wrote in message
news:1176275395.219433.8910@d57g2000hsg.googlegroups.com...
> Hi all,
>
> I want to handle concurrency issue when 2 user try to update same
> record.
>
> What i want is if user1 and user2 are accessing same record and user2
> has updated same record then when user1 tries to update that record he
> should able to update it. Which is not happening currently.
>
> Can anyone tell me what should i do?
>
> thanks in advance.
>
Are all your drivers up to date? click for free checkup

Author
11 Apr 2007 3:55 PM
William (Bill) Vaughn
Ah, no. You can't remove the WHERE clause as this uniquely identifies the
row to update. If you do remove the WHERE clause, all rows in the table will
be updated. You can remove the portion of the WHERE clause that checks for
changes by other users.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
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.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

Show quoteHide quote
"Miha Markic" <miha at rthand com> wrote in message
news:32107D08-483A-462F-8C10-94AC59D6951F@microsoft.com...
>I won't question whether what you are doing is good or bad.
> But if you want to overwrite data you might remove WHERE part of
> UPDATE/DELETE adapter's commands.
>
> --
> 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/
>
> "Archana" <trialproduct2***@yahoo.com> wrote in message
> news:1176275395.219433.8910@d57g2000hsg.googlegroups.com...
>> Hi all,
>>
>> I want to handle concurrency issue when 2 user try to update same
>> record.
>>
>> What i want is if user1 and user2 are accessing same record and user2
>> has updated same record then when user1 tries to update that record he
>> should able to update it. Which is not happening currently.
>>
>> Can anyone tell me what should i do?
>>
>> thanks in advance.
>>
>
Author
11 Apr 2007 8:31 PM
Miha Markic
"William (Bill) Vaughn" <billvaRemoveT***@betav.com> wrote in message
news:eQatpGFfHHA.3508@TK2MSFTNGP02.phx.gbl...
> Ah, no. You can't remove the WHERE clause as this uniquely identifies the
> row to update. If you do remove the WHERE clause, all rows in the table
> will be updated. You can remove the portion of the WHERE clause that
> checks for changes by other users.

:-)
Of course. At least unique identifier has to be present. My bad.

--
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/
Author
11 Apr 2007 11:11 AM
Cor Ligthert [MVP]
Archana,

That depends if it is something as this
Name = Cor
Name = Miha

Than it is not so important, the name is just set and which one was first is
just a matter of seconds who came first.

However if if is the result of this.
Bankaccount = 100000 (where 100000 is the result of  1000 + 99000)
Bankaccount = 1000 (where 100 is the result of  100000 - 99000)

Than I shall *not* use the method Miha shows. (As he told in a way in his
message he don't want to discuss, but he will find it of course as well
bad).

Cor





Archana" <trialproduct2***@yahoo.com> schreef in bericht
Show quoteHide quote
news:1176275395.219433.8910@d57g2000hsg.googlegroups.com...
> Hi all,
>
> I want to handle concurrency issue when 2 user try to update same
> record.
>
> What i want is if user1 and user2 are accessing same record and user2
> has updated same record then when user1 tries to update that record he
> should able to update it. Which is not happening currently.
>
> Can anyone tell me what should i do?
>
> thanks in advance.
>
Author
11 Apr 2007 12:51 PM
Yuancai (Charlie) Ye
Hi, Archana

    User 1 needs to send an instant message to user 2. Here is the solution
at the article http://www.udaparts.com/document/articles/chatservice.htm.

Regards,



Show quoteHide quote
"Archana" <trialproduct2***@yahoo.com> wrote in message
news:1176275395.219433.8910@d57g2000hsg.googlegroups.com...
> Hi all,
>
> I want to handle concurrency issue when 2 user try to update same
> record.
>
> What i want is if user1 and user2 are accessing same record and user2
> has updated same record then when user1 tries to update that record he
> should able to update it. Which is not happening currently.
>
> Can anyone tell me what should i do?
>
> thanks in advance.
>

Bookmark and Share