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)
 Locking Rows

Author  Topic 

ddasilva99
Starting Member

26 Posts

Posted - 2006-10-17 : 18:29:44
Hi Everyone,

How do I handle the following situation.

Client A wants to update row#1 in my studentinfo table
Client B wants to update the same row#1 in my student table

How do I prevent Client A/B from overwriting each others changes?

Thanks,
Derek

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2006-10-17 : 22:53:30
Put a timestamp on your table and only update the row where the timestamp equals the same value as when you read it out. If you update no rows then you know someone else got there first. How you handle that is up to you.
Go to Top of Page

ddasilva99
Starting Member

26 Posts

Posted - 2006-10-18 : 00:03:36
Isnt MS SQL 'smart' enough to detect when two people are trying to update the same row?
Go to Top of Page
   

- Advertisement -