| Author |
Retrieving the Query after values are set in Prepared Statement
|
ShivPrakash Srivastava
Ranch Hand
Joined: Mar 24, 2005
Posts: 88
|
|
Hi All I am using Preparestatement to query the database.For this Iam setting the values and execute the queries. Is there any way by which I can get the final query which is build after all the data values are set in preparedstatement . It is very time consuming to check for the faulty data value through Java , when you have large number of columns. Can any one suggest me the best way to accomplish this. Thanks and Regards Shiv
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
The quick way I do it is to use the trace utility in my database to see the eventual procedure run, which is easy to do if you are familiar with your database. You might consider p6spy also. It logs everything JDBC does including the values it binds in PreparedStatements.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Armando Perdomo
Greenhorn
Joined: Mar 07, 2007
Posts: 2
|
|
I believe p6spy is a great solution but it doesn't have a client and it is not easy to setup the first time. That was the reason we implemented a new solution integrating everything - Elvyx. I am pretty sure Elvyx could be useful on this kind of tasks. BTW, it is working fine, but we need feedback from people like you. It will help us to improve the tool. Any idea, comment, etc will be appreciated. Greetings, Armando Perdomo ;-) http://www.elvyx.com
|
 |
 |
|
|
subject: Retrieving the Query after values are set in Prepared Statement
|
|
|