I have a application where I use the statement :
last_id = ((org.gjt.mm.mysql.Statement) pstmt).getLastInsertID();
with struts 1.1b1 and mm.mysql driver (most recent) it works good. But
now I have upgraded to a newer version of struts (and mysql) and it
stopped working. I get the following error :
java.lang.ClassCastException:
org.apache.commons.dbcp.DelegatingPreparedStatement
at
nl.linuxonline.shop.product.PictureJdbcBean.insert(PictureJdbcBean.java:
67)
at
nl.linuxonline.shop.product.CreatePictureAction.execute(CreatePictureAct
ion.java:100)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:446)
.....
I replaced the code with a max(id) and now it works again, but does
anybody know why this doesn't work anymore ??
Or is there a better way to use autoincrement ??
Regards,
Edwin
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>