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