Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking Records Access 2000

Status
Not open for further replies.

damaruk

Technical User
Aug 2, 2000
53
GB
I am using a database on a server. I want to prevent 2 people accessing a single record at anytime to ammend it. I have ticked the lock edited records in Options



Can anyone help.
[sig][/sig]
 
This is one of the most difficult areas in database programming I think. I have decided to take the following course of action for my current customers project.
I use only unbound forms. The user that first asks for the record gets their ID and a time stamp entered into the record in two fields, UserID and LockTime. If another users tries to grab the record they get a message like this...
"This Record is locked by 'UserID' until 'LockTime + Limit'"
Then they could take the record away from the first user depending on a password. This has worked great for me. Let me know if this helps. [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
Sorry John I dont understand what you are trying to say. [sig][/sig]
 
Well, sorry about the greek message I posted. The record locking issue is somthing you will find a lot of posting about if you search the forums for that key word. I did not spend very much time working with Access record locking choices (optimistic, or pesemistic) My customer did not want the ugly and confusing message regarding edit conflicts to come up in a user's face. My approach requires that any area where more than one user could edit the same record at the same time be managed in unbound forms. If you are not familular with unbound forms, this is a big step. In short, the user request a record by entering in some bit of information like the Customer ID, then I get that customers info and display it on the form. At the time I grab the info I also set a lock on the record as I explained above. When the user is done with the Customer record and saves it, the lock is removed.

If this seems like somthing you want to consider let me know. But be sure to check out the other postings related to this subject.

[sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top