Re: Problem with SQLCA.SQLERRD[2] and Oracle

[email protected]
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <051820051830.356.428B89AF000598320000016421602813029D0A0902070BD29B9D0A0D019D@att.net>
Try this:
> INSERT INTO temp (unico, dta) VALUES (0, TODAY) 
> LET vl_integer = SQLCA.SQLERRD[2] 
> DISPLAY vl_integer 
> 
>

-------------- Original message from Giovanni Zuliani <[email protected]>: -------------- 


> Hi all, 
> I have the following problem. 
> 
> I insert a row in a table that have a field defined "SERIAL", then I use 
> the SQLCA.SQLERRD[2] to receive the value inserted for the serial. 
> The value returned is -1. 
> The table has the trigger and sequence for the simulation of the 
> Informix serial and are enabled. 
> 
> I attach a sample: 
> 
> DATABASE PRACTOR 
> MAIN 
> DEFINE vl_integer INTEGER 
> 
> 
> CREATE TEMP TABLE temp (unico SERIAL, 
> dta DATE ) 
> INSERT INTO temp (dta) VALUES (TODAY) 
> LET vl_integer = SQLCA.SQLERRD[2] 
> DISPLAY vl_integer 
> 
> DROP TABLE temp 
> CREATE TABLE temp (unico SERIAL, 
> dta DATE ) 
> INSERT INTO temp (dta) VALUES (TODAY) 
> LET vl_integer = SQLCA.SQLERRD[2] 
> DISPLAY vl_integer 
> DROP TABLE temp 
> END MAIN 
> 
> 
> The Fourj's runtime version is 3.54 for Windows 
> The server is a Windows 2000 
> The database is Oracle 8.1.7.4.1 
> 
> Can anyone helps me? 
> Thank you 
> 
> Giovanni Zuliani 
> SMC TREVISO SRL 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.