Hi,
I'm having problems with the sqlca array. Basically, I have a program which uses sqlca.sqlerrd[2] after an insert. This insert is within a BEGIN WORK and COMMIT WORK.
My error is that sqlerrd[2] returns a ZERO instead of a value (the last serial # inserted into the table). Is this a setup issue ? Or how can I fix this problem ?
Here's the info if someone can shed some light into this.
Thanx in advance.
Informix Dynamic Server Version 7.31.UC5
INFORMIX-4GL Version 7.20.UE2
Here's part of the pgm code:
begin work
insert into iv_f values (...) display "errd2 / ",sqlca.sqlerrd[2], "errd[3] / ", sqlca.sqlerrd[3], "code / ",
sqlca.sqlcode
COMMIT WORK
display "errd2 / ",sqlca.sqlerrd[2], "errd[3] / ", sqlca.sqlerrd[3], "code / ",
sqlca.sqlcode
The ouput:
errd2 / 0errd[3] / 1code / 0
errd2 / 0errd[3] / 1code / 0
What it should return...
errd2 / 1995errd[3] / 1 code / 0
errd2 / 0errd[3] / 1 code / 0
I'm having problems with the sqlca array. Basically, I have a program which uses sqlca.sqlerrd[2] after an insert. This insert is within a BEGIN WORK and COMMIT WORK.
My error is that sqlerrd[2] returns a ZERO instead of a value (the last serial # inserted into the table). Is this a setup issue ? Or how can I fix this problem ?
Here's the info if someone can shed some light into this.
Thanx in advance.
Informix Dynamic Server Version 7.31.UC5
INFORMIX-4GL Version 7.20.UE2
Here's part of the pgm code:
begin work
insert into iv_f values (...) display "errd2 / ",sqlca.sqlerrd[2], "errd[3] / ", sqlca.sqlerrd[3], "code / ",
sqlca.sqlcode
COMMIT WORK
display "errd2 / ",sqlca.sqlerrd[2], "errd[3] / ", sqlca.sqlerrd[3], "code / ",
sqlca.sqlcode
The ouput:
errd2 / 0errd[3] / 1code / 0
errd2 / 0errd[3] / 1code / 0
What it should return...
errd2 / 1995errd[3] / 1 code / 0
errd2 / 0errd[3] / 1 code / 0