Hi
I have a block based on procedures.
If I have an exception when I try to insert a record for example, how can I display a user friendly message in the status bar ?
here is my insert procedure :
PROCEDURE emp_insert2(t IN emptab) IS
BEGIN
FOR i IN t.first..t.last LOOP
INSERT INTO emp (empno, ename, job, hiredate, sal)
VALUES(t(i).empno, t(i).ename, t(i).job, t(i).hiredate, t(i).sal);
END LOOP ;
EXCEPTION
When DUP_VAL_ON_INDEX then
Raise_Application_Error( -20002, '^This identifier already exists^' ) ;
END emp_insert2;
When I use the ON-FORM trigger and ERROR_CODE and ERROR_TEXT variables, I get an FRM-XXXX message saying :
40735--INSERT-PROCEDURE trigger raised unhandled exception ORA-00001.
I want a message like :
ORA-20002 This identifier already exists