Solved

Get the SQL String From a JDBC Prepared Statement

Posted on 2001-06-21
3
391 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now