Friday, March 23, 2012

getting SQL query from Statement

Is there any way to get a SQL query using Microsoft's implementation of JDBC
interfaces/classes?
I know using Oracle, I can type cast a Statement into an OracleStatement and
it has a new method which returns the SQL query associated with that
Statement object
Any way to do this with SQL Server classes?
There isn't any and even if there were I would not recommend using it.
It will make your code dependent on the particular driver/DBMS
combination. If you really-really need to debug something use P6Spy,
but not in a production environment.
Alin,
The jTDS Project.

No comments:

Post a Comment