prevent Multiple users updating same record same time and same table
-
Hi, I need to prevent multiple users updating same record same time and same table , i tried with Sq l-transactions , every user data updating properly but last user data will be the current data , here i need to show alert message for second user onwards. Please suggest me better way to do this. Regards, Vishnu.
-
Hi, I need to prevent multiple users updating same record same time and same table , i tried with Sq l-transactions , every user data updating properly but last user data will be the current data , here i need to show alert message for second user onwards. Please suggest me better way to do this. Regards, Vishnu.
The accepted way to do this is to hold some form of version information on the table (be it an update tickcount, or incrementing number). Retrieve this with your record, and pass it back in when you attempt to update the record. If the version doesn't match on the update, it means that somebody else has updated the record while you were editing it. At this point, you can inform the user that the record has been updated by somebody else.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Hi, I need to prevent multiple users updating same record same time and same table , i tried with Sq l-transactions , every user data updating properly but last user data will be the current data , here i need to show alert message for second user onwards. Please suggest me better way to do this. Regards, Vishnu.
This will help you. 6 ways of doing locking in .NET (Pessimistic and optimistic)[^]
thatraja
**My Tip/Tricks
My Dad had a Heart Attack on this day so don't...
** -
Hi, I need to prevent multiple users updating same record same time and same table , i tried with Sq l-transactions , every user data updating properly but last user data will be the current data , here i need to show alert message for second user onwards. Please suggest me better way to do this. Regards, Vishnu.