Re: Locks in SPL
Posted in 1996
In article <32566B57.3F45@explorer.csc.com>, "Chao Y. Din" <cdin@explorer.csc.com> writes >Frank Orr wrote: >> >> Could someone please advise if they know of a way to force spl to wait >> a given period of time before returning an error when it encounters a >> locked row? >> >> I know you can set lock wait in 4gl and c but I don't believe this will >> work in SPL. Also, is there a global variable that can be set for the >> engine. >> > >I don't know whether set lock wait will work in SPL. Maybe it shouldn't >(just like the set transaction statement). However, you can set lock >wait before calling SPLs. > >Chao It does work, towards the beginning of this year I had a client write their own triggers/stored procedures and could not work out why my 4GL application was getting Lock timeout errors even though I had done a "set lock mode to wait" i.e. wait forever for locks. It turned out they did a "set lock mode to wait 30" in SPL. Once the trigger/ called stored procedure returned the lock mode STAYED SET TO WAIT 30. IF YOU CHANGE LOCK MODE IN SPL IT STAYS SET FOR THE REST OF THE SESSION. -- David Williams