need jdbc help!!
Posted in 1997
Topics: Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL, Java & JDBC Development
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!). The second problem I have is even identifying that a column is a serial column. The ResultSetMetaData class has a "isAutoIndent" method, but it is not implemented. I figure it out by looking in the system catalog, but for that I need the "getTableName" method, and that doesn't work either. Is there any way I can figure out that a certain column from a query I make is a serial column? This is important, because it is impossible to update serial columns. Thanks for any help anyone can give, Adi. ---------------------------------------------------------- Adi Lachman, Resident MSIL Hacker (self proclaimed) phone: (972) 9-9522721 email: r53837@email.sps.mot.com Motorola Semiconductor Israel (MSIL) ---------------------------------------------------------- -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet