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 -> Problem with trigger/sqlca.sqlerrd[2]

Problem with trigger/sqlca.sqlerrd[2]

From: Matthias Meier <meier_at_fuh.de>
Date: Thu, 09 Mar 2006 10:17:59 +0100
Message-ID: <7sroud.4ol.ln@mail.fuh.de>


Hello,

I have an urgent problem with 'serial' columns:

I created a tabel and added an sequence/ trigger (before insert) to one column. Now I inserted rows with a c-programm.
After the row is inserted i need to read the value of the 'SERIAL' column, but sqlca.sqlerrd[2] is always '0'.

The trigger is working - if i select the columns afterwards, the serial-numbers are correctly set.

The sequence/trigger was created as follows:

create sequence my_seq start with 1 increment by 1; create or replace trigger my_trigger
before insert on my_table
for each row
begin
select my_seq.nextval into
:new.serial_col from dual;
end;

Many thanks for all help!!

Matthias Received on Thu Mar 09 2006 - 03:17:59 CST

Original text of this message

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