Solved

Get the SQL String From a JDBC Prepared Statement

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apps blocked by Java 9 88
object oriented programming comparison 5 77
servlet filter example 37 72
Java class and jar 3 25
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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 arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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.

820 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