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'm using Tomcat 5.54, JDK 1.4.2, Informix JDBC 2.21
Here's my code:
Connection conn = getConnection(); //using JNDI
connection in Tomcat
Statement stmt = conn.createStatement();
stmt.executeUpdate("INSERT INTO jsp_name
values(0,'TESTNAME','TESTDESC')");
int key = ((IfmxStatement)stmt).getSerial();
out.println(">"+key);
I configure as follow
<transactionManager type="JDBC" commitRequired="true">
<dataSource type="SIMPLE">
<property value="${driver}" name="JDBC.Driver"/>
<property value="${url}"
name="JDBC.ConnectionURL"/>
<property value="${username}"
name="JDBC.Username"/>
<property value="${password}"
name="JDBC.Password"/>
<property value="15"
name="Pool.MaximumActiveConnections"/>
<property value="15"
name="Pool.MaximumIdleConnections"/>
<property value="1000" name="Pool.MaximumWait"/>
</dataSource>
</transactionManager>
What do I have to do with Tomcat's DBCP to get this
working??? what do I have to get this working?
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo