Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Concurrenct problem

0 views
Skip to first unread message

priyadarshanv

unread,
Dec 3, 2009, 9:13:34 AM12/3/09
to
Hi All,
On my web application(C#) we have a transaction and within the transaction we are calling a store procedure. And after the execution of store procedure we are committing the transaction.

Inside the store procedure we are fetching a value (an integer) from a column(table) and using the same value incremented by 1 we are updating the same column for the next record. THis works fine when users are hitting the SP at different times.
But when more than one user(say 2 users) trying to hit the store procedure at the same time, both the users are fetches the same value say 44567 from the table and updating it as 44568 for the next record, where it should be 44568 for the first record and 44569 for the second record.

PLeaseee help me out to handle this.
It would be really helpful if you could pull me out of this issue ASAP.


Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET Which Control Generated My PostBack?
http://www.eggheadcafe.com/tutorials/aspnet/5f7d5fbc-d1fa-4bac-8aac-701f9f97dc3f/aspnet-which-control-gen.aspx

Scott Morris

unread,
Dec 3, 2009, 1:41:13 PM12/3/09
to
Answered in .programming. Please do not post the same message independently
to multiple newsgroups.


0 new messages