Re: Help with CONSTRAINTs in Oracle

From: Fred Miller <fred_miller_at_Merck.Com>
Date: 3 Jan 1995 09:45:34 -0600
Message-ID: <9501031552.AA23482_at_igw.merck.com>


In article <3e3hoe$4ps_at_hermes.is.co.za> debj0113_at_sasoldns (Jannie de Beer GID SSG) writes:
>Path:
>merck.com!newsserver.jvnc.net!igor.rutgers.edu!rutgers!sgigate.s
 gi.com!sgiblab!s
>wrinde!howland.reston.ans.net!news.sprintlink.net!hermes.is.co.z
 a!sasoldns!debj0
>113
>From: debj0113_at_sasoldns (Jannie de Beer GID SSG)
>Newsgroups: comp.databases.oracle
>Subject: Help with CONSTRAINTs in Oracle
>Date: 31 Dec 1994 12:10:54 GMT
>Organization: The Internet Solution (Pty) Ltd
>Lines: 16
>Message-ID: <3e3hoe$4ps_at_hermes.is.co.za>
>Reply-To: debj0113_at_sasoldns.sasol.co.za
>NNTP-Posting-Host: sasoldns.sasol.co.za
>X-Newsreader: TIN [version 1.2 PL2]

>Hi.
>I am currently involved in converting an inhouse Sybase system
 to
>Oracle 7. But I have a problem with the way that Oracle seems
 to
>handle the CONSTAINT clause. When I declare a constaint in my
>Sybase system on a column or table, Sybase gives me the
 possibility
>to bind or link an error message to that constraint. As that
 constraint
>is violated Sybase then responds with a meaningfull error
message.

>I cannot find a way to bind a meaningfull error message to a
>constraint in Oracle. This is esspesialy a problem when more
 than
>one constraint are linked to a table and it's columns, as the
 user
>doen't know which constraint was violated and produced the
error.

>Thanks in advance for any help.
 

>Jannie dB

The best way to identify a constraint in ORACLE7 is through its name. Default
constraint names will leave the end-user clueless as to what condition has
been violated. Adopt a naming convention for your constraints that identifies
what the constraint is enforcing. When ORACLE returns an error, it will
reference the constraint name in the error text.

Hope this helps.

-Fred Miller, Merck & Co., millerf_at_merck.com Received on Tue Jan 03 1995 - 16:45:34 CET

Original text of this message