record locking with Access

Results 1 to 2 of 2

Thread: record locking with Access

  1. #1
    Join Date
    Dec 1969

    Default record locking with Access

    OK I&#039ve read the posts here but I don&#039t think I quite have a solution to this yet - would appreciate some help<BR><BR>I have a record amend function on my site - it reads the record to amend (no locking) and allows user to alter details on a form. This form then posts to some other asp which reads and locks the record then updates it.<BR><BR>Problem is, what if 2 people are amending the same record at the same time? How can I make a lock persist from one page (my form) to another (the asp that actually updates the record)?<BR><BR>I&#039ve looked at the Transaction methods (commit, rollback) etc but can&#039t really see how I can do this as when each page is unloaded you actually loose the db connection!<BR><BR>please can someone HELP!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: record locking with Access

    You could work around this problem:<BR><BR>You could add a new db-field with in it the datetime when the record was last updated.<BR><BR>You query this info, into a hidden field when the user requests the page, and you check the field BEFORE you update.<BR>if the field has changed in the meantime, don&#039t update, and send a message back like &#039The record you were trying to update has been changed. Please reload.&#039 (or whatever you want).<BR><BR>Bart.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts