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

distinguishing between different types of integrity constraint violations in ODBC

From: Albert <nothere_at_bigfoot.com>
Date: Fri, 3 Jan 2003 16:38:43 -0000
Message-ID: <av4e9s$4kh$1@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 Fri Jan 03 2003 - 10:38:43 CST

Original text of this message

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