Home » RDBMS Server » Server Administration » how to use raise_application_error?
how to use raise_application_error? [message #371847] Wed, 13 December 2000 11:00 Go to next message
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?
Re: how to use raise_application_error? [message #371848 is a reply to message #371847] Wed, 13 December 2000 15:01 Go to previous message
chandra
Messages: 31
Registered: October 2000
Member
Are you sure you are enclosing the raise_application_error withing paranthesis.
I cant see the closing paranthesis in your posting.??
Previous Topic: how to compile 'hello world' procedure
Next Topic: Executing a program from PL/SQL
Goto Forum:
  


Current Time: Wed May 01 19:17:05 CDT 2024