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.
Author |
Topic |
Beginer2012
Starting Member
45 Posts |
Posted - 2012-07-17 : 14:52:30
|
Hello,I'm writing a procedure and I would like to check if any user is currently using or selecting from a table before I lock and update the table.How can I check if the table is in use ? What I need if the table is is being accessed by another user before updating the tableThank you |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2012-07-17 : 15:25:57
|
It's not a Sole possession of a thingYou are modifying rows of data, or getting rows of dataEvery table I create as 4 columns.Who added a rowWhen it was addedWho updated a rowWhen it was updatedSome people don't care and just update rows and potentially overlay previous changesI usually select data and display it...I carry the update datetime with meWhen I go back to do an update, I check to make sure the datetime is exactly the same along with the keyIf it's not, I let them know the data has been modified sine you last grabbed...and maybe show what the changes writeThen let them decide what to doWithout a better understanding of what you are trying to do, we can't help you |
|
|
Beginer2012
Starting Member
45 Posts |
Posted - 2012-07-25 : 13:53:36
|
Thank you for the help !!!!!!!quote: Originally posted by Beginer2012 Hello,I'm writing a procedure and I would like to check if any user is currently using or selecting from a table before I lock and update the table.How can I check if the table is in use ? What I need if the table is is being accessed by another user before updating the tableThank you
|
|
|
|
|
|