You could store a userID and timecode in the db for that row to show who has it checked out and when it will be available. The only thing is that you need some sort of way to resolve the situation where someone opens a record and closes their browser before checking it back in. This could be javascript or something but if that fails for some reason on the client then you're screwed. If you figure out the "rules" for checking in and out, you can just store the ID and stuff in the db or in the application scope, depending on the number of records you expect at a given time and such.
John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -----Original Message----- From: Jeff Langevin [mailto:[EMAIL PROTECTED] Sent: Monday, May 09, 2005 12:01 PM To: CF-Talk Subject: "Locking" a DB record while editing I am curious to know how you folks have handled locking a database record in a shared application. Basically user 1 selects from a list of records to edit. Normally, I would then immediately go in an write a timestamp that "locks" the record. When user 2 comes I don't allow him/her to edit that record as long as that timestamp is, say... no older then 15 minutes. If it is older, then the "timeout" has been reached and I clear the lock. This is pretty down and dirty way to handle it. How else do folks handle these situations? --Jeff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206075 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

