Hi,
I have a PreparedStatement like for example this:
Connection con = getConnection();
String sql = "SELECT * FROM table WHERE name = ? AND age = ?";
PreparedStatement stmt = con.prepareStatement();
// Setting data in the prepared statement...
I would like to print out the query that is to be executed, with the ? replaced by the data I set. Anybody know how to do this?
Both getMetaData and getParameterMetaData generated an error saying it was an invalid operation.
Thnaks