Re: Help with Insert (ESQL/C)
Posted in 1993
> > -> I have a scienario where I need to insert into one table > ->and one of the columns of the table is of serial datatype. After > ->inserting into this table, I need to know what the column value > ->is ( the serial type one) and insert this value into another > ->table where it is a foreign key. > The value you want is in global variable 'sqlca.sqlerrd[2]'. > > In my ESQL/C manual, it's on pages 2-18 ff. For my 4GL colleagues, it's on > pages 3-77 ff of I4GL Ref. Manual Volume 1. > In my ESQL/C (version 4.00) manual, it's in sqlca.sqlerrd[1], _not_ sqlca.sqlerrd[2]. sqlca.sqlerrd[2] is the number of rows processed. I hope that this was just a typo, because I don't want to think that something like this would change across versions. In reference to my previous post (where I claimed that this didn't exist in Informix ESQL/C 1.0), I guess that I didn't RTFM closely enough way back then. Informix ESQL/C 1.0 _does_ return this value in sqlca.sqlerrd[1]. -- Bill Foote bill@pds.com MIS Director uunet!promdist!bill PDS Corp, Los Angeles, CA USA