Re: Lock Mode Wait x
Posted in 2000
scott_d83@my-deja.com wrote: > > Please understand that I am a VB programmer and not in any way an > Informix programmer so keep that in mind when trying to understand my > question. ( Had to get that disclaimer out so I wouldn't get flamed! ;) > > I have to support quite a few custom VB apps that connect to an > Informix database via an Intersolv ODBC driver. The apps always call > stored procedures. Within these stored procedures, many have "Lock > Mode Wait 10" or some other timeout value. My question is, if the > timeout expires, does the stored procedure just fail? If it does just YES it will give you a lock error. > fail, is there a way to return to my code an error to know when this > has happened? Also, if several updates are done within the SP, do they You can use the ON EXECPTION and RAISE EXCEPTION statements of the SPL to trap errors. Refer to the Informix Guide to SQL Syntax. If you don't have it you can easily download it from the Informix web site. > get rolled back if a latter one times out? (When any "work" (updates or > deletes) is done, there is always a begin work and commit work in the > SP) If there are errors within a transaction (lock error is one of them), the transaction automatically rolls back without you explicitly specifying it. However, with using a RAISE EXCEPTION and ON EXCEPTION you have to explicitly roll it back. > > Any help or insight on how the lock mode wait acts after it times out > would me appreciated. After it times out it will return an error (assuming you don't use RAISE and ON EXECPTION). > > TIA > > Scott > > Sent via Deja.com http://www.deja.com/ > Before you buy.