Subject | Re: [firebird-support] select ..... with lock |
---|---|
Author | Pavel Menshchikov |
Post date | 2005-03-01T18:34:40Z |
Hello,
r> i have one question. how can i decide that a record was locked with a
r> select-statement like 'select * from table where ..... with lock'?
r> i tried it with a try..except but i didn't work.
What did you do in your try...except block?
AFAIK, you have to try to update the record: if that operation raises
an exception, the record is locked (not necessarily by SELECT ... WITH
LOCK, maybe by common UPDATE). Note that your transaction must be NO
WAIT to raise the exception.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com
r> i have one question. how can i decide that a record was locked with a
r> select-statement like 'select * from table where ..... with lock'?
r> i tried it with a try..except but i didn't work.
What did you do in your try...except block?
AFAIK, you have to try to update the record: if that operation raises
an exception, the record is locked (not necessarily by SELECT ... WITH
LOCK, maybe by common UPDATE). Note that your transaction must be NO
WAIT to raise the exception.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com