aspose file tools
The moose likes Java in General and the fly likes WrappedPreparedStatementJDK6 get SQL query. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "WrappedPreparedStatementJDK6 get SQL query." Watch "WrappedPreparedStatementJDK6 get SQL query." New topic
Author

WrappedPreparedStatementJDK6 get SQL query.

Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 435


I have a WrappedPreparedStatementJDK6 being used to which I need to make a few modifications. To start with I want to know the SQL query inside this PreparedStatement. How can I get to know this?
Ramon Anger
Ranch Hand

Joined: Apr 19, 2011
Posts: 56

You could debug your statement execution.
Maybe the method getUnderlyingStatement() from WrappedPreparedStatement contains an info on the sql statement itself but this would probably be without parameter replacement.


Blackbelt on BlackBeltFactory.com.
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 435


Thanks thats what I was looking for.
The parameters could be found easily goin on a DEBUG mode.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: WrappedPreparedStatementJDK6 get SQL query.
 
Similar Threads
want toknow all the object names in a database
tables in the database
SQL Server limiting result set
Problem Named Queries In Hibernate
SQLException:Invalid column name