MySQL JDBC Tip Of The Day

Posted on Thursday, June 17th, 2004 6:24 PM

Want to debug a PreparedStatement with the values that are passed to it? Using the MySQL Connector/J 3.0+?

Do this:

System.out.println(pstmt.toString());
Or use your favorite logging engine, etc.

How the hell I've missed this up until now is a mystery. Please comment if this is news to you so I don't feel like a total dork...

-Russ