Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Replacing default column constraint violation messages in Forms...

Re: Replacing default column constraint violation messages in Forms...

From: <bhogak_at_my-dejanews.com>
Date: Thu, 30 Jul 1998 00:10:44 GMT
Message-ID: <6podm4$4f1$1@nnrp1.dejanews.com>


Hi Mark! I think the error msg is not due to your trigger creation. If you go into Help and look at Display errors, it would give a syntax for Insert statement and would probably say unique key violation. It is more because of 'record status'. Look into it and even if you solve it, let me know. Are you by any chance trying to retrieve recs by a query and trying to update it? I came across this prob earlier, but it has been sometime since I used forms.

Thanks
Kumar.

In article <35bf3201.0_at_news.rlcn.rl.af.mil>,   reichmanm_at_removethis.rl.af.mil. (Mark S. Reichman) wrote:
> I am trying to move all of my pre-update and pre-insert validation
> triggers from the 3.0 form level to the database trigger level.
>
> I wrote the following test trigger. It is only a test trigger
> and will not be used. Problem is, the message that I put in the
> RAISE_APPLICATION_ERROR does not show up in the form.
> The trigger does work and halts the insert or update when a date
> is input greater that 2000, but the error message in the form is
> "FRM-40508: ORACLE error -- unable to INSERT record."
> How do I overide this message with my own personal message.
> Good answers recieve a free cookie..
>
> CREATE OR REPLACE TRIGGER JUNK_DATE
> AFTER INSERT OR UPDATE ON JUNK FOR EACH ROW
> BEGIN
> IF :NEW.DATE2 >= TO_DATE('01-JAN-2000','DD-MON-YYYY') THEN
> RAISE_APPLICATION_ERROR(-20100,
> 'ERROR: This date is greater than the year 2000');
> END IF;
> END;
> .
> /
>
> -Mark
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Jul 29 1998 - 19:10:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US