File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URGENT !!! how do i find query string in prepared stmt ???

 
Tejas Tambe
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guyz...
Can any 1 tell me how to find out the query string generated by prepared statement, before execution.
with thanx in adavance...
Tejas
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tejas Tambe:
Hi guyz...
Can any 1 tell me how to find out the query string generated by prepared statement, before execution.
with thanx in adavance...
Tejas

No fast way to do this. You've got to just use System.out.println on the query String used to prepare the PreparedStatement, and then printout all the values you set. Manually you can replace the question marks with the actual values ( adding single quotes where necessary ).
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic