• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Retrieving the Query after values are set in Prepared Statement

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
We're being followed by intergalactic spies! Quick! Take this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic