How do find debugging problems related to JDBC API?
Answer Posted / aditi
A good way to find out what JDBC calls are doing is to
enable JDBC tracing. The JDBC trace contains a detailed
listing of the activity occurring in the system that is
related to JDBC operations.
If you use the DriverManager facility to establish your
database connection, you use the DriverManager.setLogWriter
method to enable tracing of JDBC operations. If you use a
DataSource object to get a connection, you use the
DataSource.setLogWriter method to enable tracing. (For
pooled connections, you use the
ConnectionPoolDataSource.setLogWriter method, and for
connections that can participate in distributed
transactions, you use the XADataSource.setLogWriter method.)
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to connect multiple database in jdbc?
What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?
What is the use of the statement in jdbc?
What is difference between java.util.Date and java.sql.Date?
Can I use JDBC to execute non-standard features that my DBMS provides?
Why do we use jdbc statements?
What is new in JDBC 2.0?
What is a connection string used for?
How do I stop nullpointerexception?
If I use the JDBC API, do I have to use ODBC underneath?
What is the advantage of namedparameterjdbctemplate?
How to set NULL values in JDBC PreparedStatement?
What do you mean by odbc?
Is possible to open a connection to a database with exclusive mode with JDBC?
What is JDBC ResultSet?