Get query from java.sql.PreparedStatement
Posted
by llm
on Stack Overflow
See other posts from Stack Overflow
or by llm
Published on 2010-04-21T13:21:13Z
Indexed on
2010/04/21
13:23 UTC
Read the original article
Hit count: 272
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.
© Stack Overflow or respective owner