how to use raise_application_error? [message #371847] |
Wed, 13 December 2000 11:00 |
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?
|
|
|
|