Possible Duplicate:
How can I get the SQL of a PreparedStatement?
I make a PreparedStatement (PS) and run some setString(int a,String b) on it.
After this, how do I see what my PS finally looks like ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I understand you, you’d want someting like:
and then you want to see a string like:
Did I get your meaning right?
If so, I think you can’t do that. I think the statement is precompiled without parameter values, and these are kept separately, so you can reuse the statement with different parameters.
What you can do, is to retrieve parameter metadata, like this:
And then call stuff like: