Re: need jdbc help!!
Posted in 1997
On Thu, 24 Jul 1997 adil@msil.sps.mot.com wrote: } I'm using JDBC drivers to access an informix online 5 database. I've } got drivers both from openlink and sco, and with neither can I solve my } two problems. } } The first problem I have is that I have no way of figuring out what } value was inserted in a serial column. In embedded SQL, there is the } SQLCA structure, which holds the value inserted into a serial column in } the last insert; however jdbc doesn't allow access to this structure } (does it?). Is there any other way I can do this? I need to know what } value was inserted into the serial column in an insert command, so that } I can link that tupple somewhere else. The only way I though of } involves creating a table, inserting the serial value with a unique } value into that secondary table, then looking up the serial value via } the unique value, and deleting the entry. This is a three-access } procedure just to get a serial value, before I even use it anywhere!!! } There's got to be a better way (I certainly hope so!). Try to create a store procedure to do the insertion for you, and the stored procedure return the serial column id as result. I think this shall work.