• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

Get the SQL String From a JDBC Prepared Statement

I've instantiated a PreparedStatement object and set all its string parameters but I want to get a look at the complete SQL string before i send it to the database. toString() just prints out the object reference. Does anyone know how?
0
comahony
Asked:
comahony
  • 2
1 Solution
 
TimYatesCommented:
Don't think you can with Java...

Maybe if you turn on SQL logging on your database, that would show it?

Tim
0
 
NachiapCommented:
yeah you cant see the full query in java ..
0
 
TimYatesCommented:
Wow! Thanks for the points :-D

Good luck in the future,

Tim.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now