Re: Using On-Error Trigger in Developer Forms

From: <kskasi_at_hotmail.com>
Date: 2000/07/27
Message-ID: <397F9F0B.686D173A_at_hotmail.com>#1/1


Hi there

I guess you are not using an else statement in your on-error trigger. Use an else statement in your on error trigger to trap any error messages other than unique constraint violation on inserting. SO your else statement should have the following statement

ELSE
   Message(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt);    RAISE Form_Trigger_Failure;
END IF; cheers...Kasi

Tuns wrote:

> Hi there!
>
> I have a slight problem in trapping a constraint violation
> in forms runtime. I have altered the table to insert a
> unique constraint and in Forms Designer added an On_error
> trigger relating to the violation of this constraint when a
> user inserts non unique records. This works well when a
> user inserts a new record i.e the triggers returns a user
> friendly message but it does not when a user updates a
> record. The constraint is upheld but no message appears on
> the screen. Are there any FRM error codes that relate to
> updating a record that violates a unique constraint? Is
> this error code different from when inserting a new record
> that violates this constraint? Please help.
>
> Thanks.
> Tuns
>
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
Received on Thu Jul 27 2000 - 00:00:00 CEST

Original text of this message