EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #360 background imageLoading...
Page #360 background image
DB2Diagnosable interface
The com.ibm.db2.jcc.DB2Diagnosable interface provides a mechanism for getting
DB2 diagnostics from an SQLException.
DB2Diagnosable methods
The following methods are defined only for the IBM Data Server Driver for JDBC
and SQLJ.
getSqlca
Format:
public DB2Sqlca getSqlca();
Returns a DB2Sqlca object from a java.sql.Exception that is produced under a
IBM Data Server Driver for JDBC and SQLJ.
getThrowable
Format:
public Throwable getThrowable();
Returns a java.lang.Throwable object from a java.sql.Exception that is
produced under a IBM Data Server Driver for JDBC and SQLJ.
printTrace
Format:
static public void printTrace(java.io.PrintWriter printWriter,
String header);
Prints diagnostic information after a java.sql.Exception is thrown under a
IBM Data Server Driver for JDBC and SQLJ.
Parameter descriptions:
printWriter
The destination for the diagnostic information.
header
User-defined information that is printed at the beginning of the output.
Related tasks
“Handling an SQLException under the IBM Data Server Driver for JDBC and
SQLJ” on page 77
“Handling SQL warnings in an SQLJ application” on page 155
DB2ExceptionFormatter class
The com.ibm.db2.jcc.DB2ExceptionFormatter class contains methods for printing
diagnostic information to a stream.
DB2ExceptionFormatter methods
The following methods are defined only for the IBM Data Server Driver for JDBC
and SQLJ.
printTrace
Formats:
static public void printTrace(java.sql.SQLException sqlException,
java.io.PrintWriter printWriter, String header)
static public void printTrace(DB2Sqlca sqlca,
344 Application Programming Guide and Reference for Java

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability