Resource busy exception [message #2520] |
Tue, 23 July 2002 05:10 |
Mark Grimshaw
Messages: 73 Registered: June 2002
|
Member |
|
|
Hi,
Is there an exception that I can catch in a PL/SQL block which indicates that a lock (on an UPDATE statement) for a record is already held. I want to use the NOWAIT clause, detect that the resource is busy and report to the user.
Thanks
Mark Grimshaw
|
|
|
|
Re: Resource busy exception [message #2531 is a reply to message #2520] |
Wed, 24 July 2002 02:01 |
Mark Grimshaw
Messages: 73 Registered: June 2002
|
Member |
|
|
Thanks Tom,
Just wondering though, because you have to use the exception_init statement does this mean that the exception 00054 is called an UNDEFINED exception. If so I would have thought that it should actually be a defined one.
|
|
|
Re: Resource busy exception [message #2536 is a reply to message #2520] |
Wed, 24 July 2002 10:16 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
That particular exception is just not pre-defined in the STANDARD package. By using the pragma (exception_init), we are associated an Oracle error number with our own defined exception. Alternatively, you could just let the -54 error be raised in the procedure and trap it at the application level.
|
|
|