how to handle a message? [message #81027] |
Sat, 28 December 2002 23:39 |
maha
Messages: 11 Registered: November 2000
|
Junior Member |
|
|
i'm doing a search form, when i enter a name i got all the person information, my question is how to use the exception so i can change the error message that appear in the bottom of the form?!!!
|
|
|
Re: how to handle a message? [message #81035 is a reply to message #81027] |
Mon, 30 December 2002 02:52 |
Solve
Messages: 38 Registered: December 2002
|
Member |
|
|
hi, did you try this on-error trigger?
DECLARE
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
n NUMBER;
BEGIN
IF (errtyp = 'FRM' and errnum = 40401) THEN
Message('No change to save');
ELSE
Message(errtyp||'-'||TO_CHAR(errnum)||': '||errtxt);
END IF;
RAISE Form_Trigger_Failure;
END;
!You choice an error code.
Or you could write:
begin
exceptions
when others then "do SOMETHING"
end
|
|
|