File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Help on PreparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Help on PreparedStatement" Watch "Help on PreparedStatement" New topic
Author

Help on PreparedStatement

Mondli Mabaso
Greenhorn

Joined: Sep 26, 2003
Posts: 18
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


Everything is Ok @ the end, if its not OK, then its not the END
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Can you show us your code?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60045
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

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 ]

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help on PreparedStatement
 
Similar Threads
Syntax error in SQL query
session in desktop application?
Doubt about PreparedStatement
PreparedStatement vs Statement ?
how to search?