Home » SQL & PL/SQL » SQL & PL/SQL » handling error
handling error [message #37290] Tue, 29 January 2002 14:38 Go to next message
epro
Messages: 11
Registered: January 2002
Junior Member
I have 2 pl/sql programs A and B, can be run as files names(@filename). I want to call them from a 3rd file called C.

I want to call B from C, only if there are no errors, exceptions in the 1st file(A). If there are errors it should not call B.

do you have any idea to share.

Thanks
Re: handling error [message #37293 is a reply to message #37290] Tue, 29 January 2002 16:20 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
it is not possible to do that. create stored programs and call from file.

create procedure proc1 is
begin
-- 
end;

create procedure proc2 is
begin
--
end;

file 1:

declare
proc1_exception exception
begin
   begin 
      proc1;
   exception
    when others then
       raise proc1_exception;
    end;

proc2;

exception
   when proc1_exception then
     dbms_output.put_line('exception raised while executing proc1'); 
  when others then
   dbms_output.put_line('exception raised while executing proc2');
end;

dont write any exception handlers in proc1

Re: handling error [message #37298 is a reply to message #37290] Wed, 30 January 2002 04:33 Go to previous message
e-pro
Messages: 1
Registered: January 2002
Junior Member
Thanks,
I will try that. Since the schema does not have previlege to create proc, I was thinking of that option, but no I have to ask for prev.

Thanks again. I will post if I have any questions.
Previous Topic: Re: how one can call stored procedure in VB
Next Topic: numeric to sring
Goto Forum:
  


Current Time: Fri Apr 26 04:09:20 CDT 2024