Hello
I have created a trigger not to let records with certain fields null
to be inserted into the table:
BEGIN
IF :new.RUL_CODE is null or
:new.FES_UINS_C ODE is null or
:new.FES_UIO_CA LOCC is null then
RAISE_APPLICATI ON_ERROR(-20000,'Record is not saved. Check course
record and try to save again.');
end if;
end;
The trigger is set to fire before insert.
The trigger does the trick preventing the record to go into the table,
but besides my error message it shows also ORA-06512 and ORA-04088
errors, which I’d prefer my users not to see. I found numerous
opinions that these messages are OK. One of the answers in this ng:
“It's normal situation. Your trigger raise application error.
You need define exception entry for this error in block where you
enter INSERT statement.
With best regards, Igor Kirasirov”
How to define exception entry? How to hide ORA-06512 and ORA-04088
error messages?
Thank you for your help.
Galina
I have created a trigger not to let records with certain fields null
to be inserted into the table:
BEGIN
IF :new.RUL_CODE is null or
:new.FES_UINS_C ODE is null or
:new.FES_UIO_CA LOCC is null then
RAISE_APPLICATI ON_ERROR(-20000,'Record is not saved. Check course
record and try to save again.');
end if;
end;
The trigger is set to fire before insert.
The trigger does the trick preventing the record to go into the table,
but besides my error message it shows also ORA-06512 and ORA-04088
errors, which I’d prefer my users not to see. I found numerous
opinions that these messages are OK. One of the answers in this ng:
“It's normal situation. Your trigger raise application error.
You need define exception entry for this error in block where you
enter INSERT statement.
With best regards, Igor Kirasirov”
How to define exception entry? How to hide ORA-06512 and ORA-04088
error messages?
Thank you for your help.
Galina
Comment