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: distinguishing between different types of integrity constraint violations in ODBC

Re: distinguishing between different types of integrity constraint violations in ODBC

From: Albert <nothere_at_bigfoot.com>
Date: Sun, 5 Jan 2003 20:46:01 -0000
Message-ID: <ava5h8$cis$1@newsg4.svr.pol.co.uk>


I get 23000 for both.

"Jim Kennedy" <kennedy-down_with_spammers_at_attbi.com> wrote in message news:X%rR9.619261$NH2.41308_at_sccrnsc01...
> Yes. You will get back an error number. So a lot of people create a
> generic error handling routine and put the number and the message text
> there. Look in the docs for the error information.
> Jim
>
> --
> Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
> with family. Remove the negative part, keep the minus sign. You can
figure
> it out.
> "Albert" <nothere_at_bigfoot.com> wrote in message
> news:av4e9s$4kh$1_at_news5.svr.pol.co.uk...
> > I have this table
> >
> > CREATE TABLE trn_test(
> > trn_rpi number(8) not null,
> > trn_name varchar2(32) not null,
> > CONSTRAINT trn_primary_key PRIMARY KEY (trn_rpi),
> > CONSTRAINT unq_trn_name UNIQUE(trn_name));
> >
> > I am using ODBC and C and when I insert I wish to be able to distinguish
> an
> > error due to a duplicate primary key to that of the unique constraint.
Can
> > this be done ?
> >
> > PS I know I can query first but I dont want to do this (speed
> > considerations).
> > Thanks.
> >
> >
>
>
Received on Sun Jan 05 2003 - 14:46:01 CST

Original text of this message

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