Re: Serial field in Java
Posted in 1998
On Thu, 02 Apr 1998 07:31:59 GMT, ag@roninsrv.demon.co.uk (Andrew Gillespie) wrote: > >Is there any way to retrieve the last serial field number inserted >into an Informix table when using Java and JDBC? You can normally >look in SQLCA.SQLERRD[2] but this wont work with Java. Use the same connection and execute: select dbinfo('sqlca.sqlerrd1') from sometable immediately after your insert. Best to use a table with only one row. Alternatively you have to use a where clause so only one row is returned, but that is allways slower. This is all RTFM: SQL Syntax manual page 1-577 in the Acrobat version I have. If you don't have the Acrobat versions of the manual immediately download them from http://www.informix.com/answers and all of a sudden you can find all the things that where so hard in the paper manuals! Nils Myklebust NM Data AS Norway E-mail: Nils.Myklebust@nmdata.com FAQ at: Primary with ODBC info: http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html