select dbinfo('sqlca.errd1') from TABLENAME

works for me ... the first column of the JDBC resultset will be
the newly inserted value.  Fire this immediately after your insert.

HTH,

Abdullah



Clinton Begin wrote:

Okay, you've posted this enough times.  We've seen it and have
responded.  My suggestion is that you talk to Informix support about
standard ways to access the serial generated ID.

This issue barely has anything to do with iBATIS, it has more to do
with Informix and your connection pool.

Cheers,
Clinton


On Tue, 8 Feb 2005 16:26:27 -0800 (PST), Roger Baeza <[EMAIL PROTECTED]> wrote:


Hello all

Could any one help me, pls

I'm looking for selectKey sintaxis to get serial value
after inserting any row in tables for informix
database...

I was use getSerial() for ifxStatement JDBC class, but
I moving to iBatis, I can't undertand what is the
correct form tu use selectKey

documentation say:
for oracle
<selectKey resultClass="int" keyProperty="id" >
SELECT STOCKIDSEQUENCE.NEXTVAL AS ID FROM DUAL
</selectKey>

for sqlServer
<selectKey resultClass="int" keyProperty="id" >
SELECT @@IDENTITY AS ID
</selectKey>

for mysql
<selectKey resultClass="int" keyProperty="id" >
SELECT GET_LAST_ID() AS ID
</selectKey>

Infomix have serial datatype that autogerate ID,
example

Create Table Addrees(
 addressId serial not null primary,
 ....

);

Thanks alote
regards


__________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com






Reply via email to