Last inserted serial in ODBC
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi I would like to get last inserted serial using ODBC (in ESQL/C sqlca.sqlerrd[1]) what is the simplest method ? thanks for any help Jerzy ------------------------------ change you know what to com.pl
Jerzy Kasenberg wrote:
>
> Hi
>
> I would like to get last inserted serial using ODBC
> (in ESQL/C sqlca.sqlerrd[1])
>
> what is the simplest method ?
Use the DBINFO function immediately after the INSERT, so:
INSERT INTO atable (serial_col, ...) VALUES (0,...);
SELECT DBINFO( 'sqlca.sqlerrd1' ) FROM systables WHERE tabid = 1;
Obviously encode the statement into ODBC function calls and bind a long
integer to receive the result of the SELECT DBINFO... call.
Art S. Kagel
"Art S. Kagel" wrote:
> > I would like to get last inserted serial using ODBC
> > (in ESQL/C sqlca.sqlerrd[1])
>
> SELECT DBINFO( 'sqlca.sqlerrd1' ) FROM systables WHERE tabid = 1;
>
above statement results
674: Procedure (dbinfo) not found.
We have old informix I suppose any other clue
Jerzy