Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> error handling in PL/SQL
Daud,
what exception did Oracle raise when you failed to connect ? Once you know that, you can do this :
create or replace procedure AAA ....
cursor mycursor is select ... from mytable_at_remotedb;
....
begin
open mycursor;
...
except
when <whatever_you_got> then
raise_application_error(-20001, 'I cannot for the life of me get
through to remotedb');
end;
Now when it fals to get through it will barf and you'll get a rather silly error message !
HTH
Regards,
Norman.
PS. In Oracle 817 docs, see PL/SQL user guide & reference, chapter 6, error handling.
Cheers.
Tel: 0113 289 6265 Fax: 0113 289 3146 URL: http://www.Lynx-FS.comReceived on Wed Aug 14 2002 - 11:25:27 CDT
-------------------------------------