Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2005, 09:52 PM
Authorized User
 
Join Date: Feb 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default Clearing record level locks

Hi,

I'm developing a web application that requires row-level locks. The application reads and locks a particular record with a "select ... for update" statement. How is this lock cleared if the user cancels the update?

Thanks,
Tom
 
Old July 5th, 2005, 08:58 PM
Authorized User
 
Join Date: Feb 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default

I discovered that the record level locks are cleared by a commit or a rollback. The next question is what strategy do you use to maintain the connection object on which the lock is held while waiting for the user to proceed with the update or cancel it. You somehow need to maintain that connection to either commit the transaction or roll it back.





Similar Threads
Thread Thread Starter Forum Replies Last Post
spliting database in record level dhua SQL Server 2000 5 January 30th, 2007 07:32 AM
Access locks up after multiple emails sent Paulsh Access VBA 2 December 30th, 2005 03:20 PM
How to implement locks and timestamp protocol? hlchuah77 SQL Server 2000 5 January 24th, 2005 03:15 PM
Locks on my access db in win xp patricolsson Classic ASP Databases 6 December 17th, 2003 09:31 AM
¿Record Locks? Concurrency Multiple Users p_nut33 ADO.NET 0 November 18th, 2003 10:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.