Get query from java.sql.PreparedStatement
- by llm
In my code I am using java.sql.PreparedStatement.
I then execute the setString() method to populate the wildcards of the prepared statement.
Is there a way for me to retrieve (and print out) the final query before the executeQuery() method is called and the query is executed? I Just want this for debugging purposes.
Thanks.