Home » SQL & PL/SQL » SQL & PL/SQL » Resource busy exception
Resource busy exception [message #2520] Tue, 23 July 2002 05:10 Go to next message
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 #2523 is a reply to message #2520] Tue, 23 July 2002 08:35 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4515126525609
Re: Resource busy exception [message #2531 is a reply to message #2520] Wed, 24 July 2002 02:01 Go to previous messageGo to next message
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 Go to previous message
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.
Previous Topic: Last Doubt Todd Please
Next Topic: Referencing the Value of a Variable whose name is Stored in a Text Field
Goto Forum:
  


Current Time: Fri Apr 26 02:37:19 CDT 2024