EasyCFM.COM ColdFusion Forums / Other / Record Locking

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Record Locking

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

tenchiintokyo
03-29-2006 @ 6:15 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 4
Joined: Mar 2005

HI everyone! I was hoping to get some help with an issue I am trying to overcome. In my database I have a table that holds records that need updated by data entry clerks. When a clerk selects a record the web form updates the database with the user ID of the person viewing the record. I also store what time they access the record and set a flag in the database to indicate that the record is locked to prevent multiple clerks from retrieving the same record.

My problem is that sometimes the clerks will close the browser window without completing their update. This leaves the record locked and unable to be accessed by anyone else. Does anyone have a method for sending a query to update the database to unlock the record when the browser window closes.



jfill
03-29-2006 @ 8:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 446
Joined: Apr 2004

Using application.cfc you could use the onSessionEnd method to work something out.  Maybe store the session ID in the locked field.  Then maybe in the onSessionEnd method just look for all sessionID's in the table and clear them.

I am not real versed in using application.cfc, but I think something like that would work.


Website Designed and Developed by Pablo Varando.