Home » RDBMS Server » Server Administration » how to use raise_application_error?
how to use raise_application_error? [message #371850] Wed, 13 December 2000 22:24
wyshuai
Messages: 13
Registered: December 2000
Junior Member
I once defined a error code bymyself,and then use
raise_application_error(-20001,'mytext');
but error occurs when the trigger is fired.
exmple:
create or replace trigger tr_1
before update
on t_1
for each row
declare
update_error exception;
begin
raise update_error;
exception
when update_error
then raise_application_error(-20001,'unable to
update the table outside the system!';
end;
/
If I donnot use the raise_application_error(-20001,'unable to update the table outside the system!';
,no error occurs.What can i do if i want to prevent t_1 from updating?
Previous Topic: Sending E-mail via Pl/SQL
Next Topic: How to use this procedure..?
Goto Forum:
  


Current Time: Wed May 01 19:19:43 CDT 2024