Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

preventing modifying data

I have an intranet site in my company. I am using master page. One of the pages I have it is for users to pulls update data (by account number) to update and cancel accounts. I am not sure on how to go about updating data while one is viewing an  account.  Sample, if a user pull data to cancel an account, how can I prevent another user from pulling the same account and try to cancel at the same time, or even try to update the account while one is trying to cancel it?
Avatar of Padre_Corleone
Padre_Corleone
Flag of United States of America image

One option is to store the userid of the user who is viewing account information into the account number table.  This account will be locked for all others except the first user who pulled the information.  Ones this user leaves the page the lock should be removed.
Avatar of Nasir Razzaq
You probably should just give a message to one user if someone else has cancelled it at the time of updating.
Avatar of VBdotnet2005

ASKER

Are we talking about timestamp when we talk about locking? How would that work?
Locking meaning the information is read only or save button disabled during the lock. Only when the user leaves page will the lock be removed.  You could lock based on a timer if you want but your not guaranteed it will be locked long enough or it may remain locked for too long.
Hi Padre_Corleone,

"Locking meaning the information is read only or save button disabled during the lock"

Sorry, I don't have much experience on this. Could you advise on how to make it read only when user A is in the account and user B wants to get in?
ASKER CERTIFIED SOLUTION
Avatar of Padre_Corleone
Padre_Corleone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"Once User A goes to another page the record in the LockedBy column should be udpated to null. So that the record is available to be changed by another user later."

How do we update the LockedBy column when a user click on any link on Sitemap?