Re: Persistance of locks on a droped connection
Posted in 1997
1. I would definitly not use database locks for this. Appart from the conncurrency issues that might be ok for your application, you may get problems with locks beeing held for such an undefined time. Log files will not be released du to the transaction that have never been finished. Remember as users have this type of control, they may easily lock the rows over night or longer. SQL database locks where never designed to keep arround for a long time. If you think you may get into this kind of problem you may design your own cooperative "locking" system via extra columns that simply get spesial values set before data is retrieved, or an extra table for the purpose. 2. You are also right in your worries about locks remaining when a PC application hangs or the user reboots. With OpenLink ODBC drivers this is handled elegantly with keep allive packets and functions to terminate the connection properly in these situations. I am not aware of other drivers who have this functionallity. You need it. "Andrew Shumway" <ashumway@bpa.arizona.edu.nospam> wrote: :I'm a bit new to Informix and am trying to find out what hapens to locks if :an ODBC connection drops. : :I'm working on an application that will lock and retrive several rows into :a spread sheet and then update the rows when the user finishes with the :spreadsheet manipulations. : :I plan on putting an exclusive lock on the rows retrieved. In this case I :am :worried about what hapens to the row locks if the user's PC locks or s/he :reboots. : :Does anyone know of a way I can insure that outstanding locks will release :if the connection drops? Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org