permaculture playing cards*
The moose likes Java in General and the fly likes WrappedPreparedStatementJDK6 get SQL query. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
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: 443
    
    1


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: 443
    
    1


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://aspose.com/file-tools
 
subject: WrappedPreparedStatementJDK6 get SQL query.
 
Similar Threads
Problem Named Queries In Hibernate
want toknow all the object names in a database
SQL Server limiting result set
SQLException:Invalid column name
tables in the database