?
Solved

preventing modifying data

Posted on 2012-09-04
8
Medium Priority
?
266 Views
Last Modified: 2012-09-27
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?
0
Comment
Question by:VBdotnet2005
  • 4
  • 3
8 Comments
 
LVL 7

Expert Comment

by:Padre_Corleone
ID: 38366701
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.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38366939
You probably should just give a message to one user if someone else has cancelled it at the time of updating.
0
 

Author Comment

by:VBdotnet2005
ID: 38368168
Are we talking about timestamp when we talk about locking? How would that work?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Expert Comment

by:Padre_Corleone
ID: 38368236
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.
0
 

Author Comment

by:VBdotnet2005
ID: 38368669
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?
0
 
LVL 7

Accepted Solution

by:
Padre_Corleone earned 2000 total points
ID: 38369801
I don't know the details about your project but this is what i am thinking:

Database: Account Number table add a new field called LockedBy default it to null
Application: Whent he account number is pulled to the screen by user A, update the record LockecBy with the user A information: like the UserID for example (stored in the LockedBy column)
Now if User B comes in and is viewing the same account number:
Retrieve the account number on the screen and check if LockedBy is null if LockedBy is not null the UpdateButton.enabled = false.
User A still looking at the record.  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.
0
 

Author Comment

by:VBdotnet2005
ID: 38397708
"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?
0
 
LVL 7

Expert Comment

by:Padre_Corleone
ID: 38401912
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 8 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question