Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help on PreparedStatement

 
Mondli Mabaso
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Slight problem with PreparedStatement. I am attempting to retrieve the actual SQL String object from the PreparedStatement without luck. I want to this because I want to save the SQL strings in a file.

Do u have any ideas - your help will be greatly appreciated.

Thank u

Mondli
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us your code?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mondli, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

thanks,
bear
Forum Bartender
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mondli,
You can use a DebuggableStatement. JavaRanch describes this option in more detail. Alternatively, you can use the open-source P6Spy

This is a good question that Dave gets to answer every couple of months. I added it to the FAQ.

[edited to switch from wiki to UBB formatting]
[ October 03, 2005: Message edited by: Jeanne Boyarsky ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic