Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> distinguishing between different types of integrity constraint violations in ODBC
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
![]() |
![]() |