How can i solve concurrency if multiple users update the same record at the same time.
I want to use only stored Procedure.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted May 7, 2013, 8:37 AM
hi,
you can use highest isolation level to avoid such situation (maintaining a shared lock with in transaction).
Also you can use Timestamps column to maintain concurrency. Timestamp is generally used as a mechanism for version-stamping table rows. The timestamp data type is just an incrementing number and does not preserve a date or a time.
Before save data you can check timestamp whether is same as while it fetch from database or not.
hope this will help you.
Jayraj GoswamiPosted May 8, 2013, 2:01 AM
([Name]
,[Password])
VALUES
(
,
GO
Gurjeet SinghPosted May 7, 2013, 9:00 AM