A way to get autogenerated keys
Posted in 2006
Salch, Chris — — source: Usenet: comp.databases.informix
I need a way to find an auto generated key after an insert statement. I'm working with informix 9.40.HC5 on an HPUX box and have tried the following query, which works quite well on an informix 10 test machine: select dbinfo('sqlca.sqlerrd1') from systables where tabname='systables' Unfortunately, it always returns 0. I've tried this with dbinfo('serial8'), tabid=1 and several combinations of these. Nothing has worked for me yet. Any suggestions? (If there is a nice way to get the ibm jdbc driver to return it's keys according to the jdbc standard and not some obfuscated method I would gladly settle for that :)