wood burning stoves 2.0*
The moose likes JDBC and the fly likes cast PreparedStatement to org.gjt.mm.mysql.PreparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "cast PreparedStatement to org.gjt.mm.mysql.PreparedStatement" Watch "cast PreparedStatement to org.gjt.mm.mysql.PreparedStatement" New topic

cast PreparedStatement to org.gjt.mm.mysql.PreparedStatement

christine lorraine

Joined: Sep 03, 2001
Posts: 20
hi all,
i want to use the getLastInsertID() of mmMysql Driver because
according to the author it is thread safe.
in the documentation it was stated that i need to cast my
prepared statement to org.gjt.mm.mysql.PreparedStatement inorder
to use this specific function.
how can i do it? i tried several statements but i can't get it right. pls. help. or if you have other suggestions on how to
retrieve the last inserted id considering the thread safetiness issues.. i will appreciate it very much.

Joined: Jul 10, 2001
Posts: 3
If a simple cast does not work try creating a new org.gjt.mm.mysql.PreparedStatement object passing the PreparedStatement you already have, as an argument.
I agree. Here's the link: http://aspose.com/file-tools
subject: cast PreparedStatement to org.gjt.mm.mysql.PreparedStatement
Similar Threads
Wrinting a string vertically
Question on Threads
cast & instanceof
casting error
Interface question