Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL handling multiple request at same time

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-19 : 08:49:55
Sandeep writes "First i would like to dictate a case.
In one of my project there is every possibility that 2 or more
users can at the same time update a common field and which is something i want to prevent.If one user is successful in updating the field the rest of them who too have fired the query exactly at the same time should be unable to update it.
Now i want to know that how does SQL handle multiple users accessing common data exactly at he same time without a milli second difference????
I would be thankful to you if you could help me out"

izaltsman
A custom title

1139 Posts

Posted - 2002-04-19 : 10:20:50
There is a couple of ways to implement it.
The easiest would be to add a timestamp (do not confuse with DATETIME) field to your table. Then make sure that the WHERE clause of every UPDATE statement checks that the timestamp hasn't changed.

---------------
Strong SQL Developer wanted in the Boston area. Please e-mail if interested.
Go to Top of Page
   

- Advertisement -