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: Ibatis with informix problem, help me pls
Date Fri, 11 Feb 2005 00:26:34 GMT
Roger, I think you should talk to an informix support team about their
support for *standard* JDBC APIs and/or SQL statements to retrieve
autogenerated keys.

Cheers,
Clinton


On Wed, 9 Feb 2005 13:48:33 -0800 (PST), Roger Baeza <rogerimo@yahoo.com> wrote:
> Hi guy... I need help, pls
> 
> I'm trying to use Informix's
> ((IfmxStatement)stmt.getSerial() to retreive last
> inserted/update row into Database. But I am having
> problem with casting.
> 
> I'am using ibatis with informix, my problem is
> with
> table have serial informix datatype. Ibatis
> document
> say that have 2 case for get sequences value,
> before
> and after, mi case is after, but i cant undertand
> what
> i need put in selectKey to get id
> 
> <selectKey ...
>    this, what i can put??
> <select>
> 
> by de way, I thing that simple datasource solve my
> problem, I configure JDBC and SQLMAP, to let me
> create
>  simple jdbc connection and do the follow
> 
> Connection conn = getConnection();
> Statement st = null;
> 
>    st = conn.createStatement();
> 
>     st.executeUpdate( INSERT );
>     System.out.println(INSERT + "...okay");
> 
>  //this code throw exception there
>  int serialValue = ((IfmxStatement)st).getSerial();
> 
>  java.lang.ClassCastException
> 
> sep.fmat.sipre.persistent.jdbcdao.DireccionJdbcDao.insertDireccion(DireccionJdbcDao.java:64)
> 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>  Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
> java.lang.reflect.Method.invoke(Method.java:324)
> com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:72)
>          $Proxy161.insertDireccion(Unknown Source)
> sep.fmat.sipre.service.PreinscripcionService.saveDireccion(PreinscripcionService.java:94)
> 
>  regards
> 
> __________________________________
> Do you Yahoo!?
> All your favorites on one personal page – Try My Yahoo!
> http://my.yahoo.com
>

Mime
View raw message