Re: des2k:Forms Generator,Prim key constraint and Error message

From: Jeff Jacobs <jmjacobs_at_jeffreyjacobs.com>
Date: Mon, 22 Jun 1998 22:59:28 GMT
Message-ID: <358fe1a2.2364075_at_nntp.ix.netcom.com>


The same way you did before; you put the error message as one of the properties of the PK Constraint Definition (it's in the table definition dialog in the constraints tab).

Lisa Tassoni <tassonl_at_ircm.umontreal.ca> wrote:

>Hello everyone,
>
>In Forms3.0, the CaseGenerator would create a pre-insert trigger like
>this at the block level (or field level), to validate the primary key of
>a base table:
>
> DEFINE TRIGGER
>
> NAME = PRE-INSERT
> TRIGGER_TYPE = V3
> TEXT = <<<
> /* CGUV$CHK_KEYS_ON_INSERT */
> /* Call trigger(s) to check that the row to be inserted is
>unique*/
> /* according to the unique and primary keys that have been set
>up*/
> /* on this table*/
> BEGIN
> CGUV$CHK_TINT_PK_G(
> :TI.TINT_NOM /* IN : Field value*/
> ,:TI.GRP_NOM ); /* IN : Field value*/
> message_popup('This intervention already exists', 'E',TRUE);
> EXCEPTION
> WHEN NO_DATA_FOUND THEN NULL;
> END;
>
>
>Notice the error message: "This intervention already exists".
>It came from the Case Dictionary : it is the error message for
>violation of the primary Key constraint ( CGUV$CHK_TINT_PK_G).
>
>Now with the Forms Generator of Designer 2000, an on-error trigger for
>the block is created and the message displayed when the constraint is
>violated
>is (ORA-00001: Unique constraint violated)
>
>How can I get the error message from the Repository?
>Thanks in advance,
>LT

-JJ

Visit our new website at http://www.jeffreyjacobs.com

 Jeffrey Jacobs & Associates
 Oracle Designer/2000 Consulting & Training  951-2 Old Country Road, Suite 119, Belmont, CA 94002  Voice: 650-571-1457, FAX: 800-665-1379
 Email: jmjacobs_at_ix.netcom.com
 Web: http://www.jeffreyjacobs.com Received on Tue Jun 23 1998 - 00:59:28 CEST

Original text of this message