ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: selectKey for Informix
Date Fri, 11 Feb 2005 06:23:45 GMT
Thanks Abdullah.

Robert:  you should be able to put that in your <selectKey> element.

Clinton


On Fri, 11 Feb 2005 08:20:51 +0200, Abdullah Kauchali
<abdullah.kauchali@isanusi.com> wrote:
> 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 <rogerimo@yahoo.com> 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
> >>
> >>
> >>
> >
> >
> >
>

Mime
View raw message