This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement and above

 
Manoj Pooleery
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I want to see the SQL statement inside a PreparedStatement just before it is executed. (After the values have been set). Anybody got any idea as to how to display it?
TIA
Manoj.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't work that way. The PreparedStatement is sent to the database prior to having the variables loaded for precompiling. The variables are then sent for execution. JDBC doesn't replace the question marks with your variables. That is happening at the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic