Solved

Get the SQL String From a JDBC Prepared Statement

Posted on 2001-06-21
3
395 Views
Last Modified: 2010-04-16
I've instantiated a PreparedStatement object and set all its string parameters but I want to get a look at the complete SQL string before i send it to the database. toString() just prints out the object reference. Does anyone know how?
0
Comment
Question by:comahony
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 50 total points
ID: 6214726
Don't think you can with Java...

Maybe if you turn on SQL logging on your database, that would show it?

Tim
0
 

Expert Comment

by:Nachiap
ID: 6215904
yeah you cant see the full query in java ..
0
 
LVL 35

Expert Comment

by:TimYates
ID: 6256475
Wow! Thanks for the points :-D

Good luck in the future,

Tim.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Protect jar file - windows app 2 53
stackato and cloud 4 86
servlet example 11 40
Desingning Refactoring existing code 2 24
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question