JDBC provides a handful of other
classes and interfaces that support JDBC’s core functionality.
Many of them are more SQL-friendly extensions of
java.util classes like
java.sql.Numeric. Others are exception classes
that get thrown by JDBC calls.
Types class provides
constants that identify SQL datatypes. Each constant representing a
SQL datatype that is mapped to an integer is defined by the XOPEN SQL
specification. You will see this class used extensively in the next
extends the general
java.lang.Exception class that
provides extra information about a database error. The information
The SQLState string describing the error according to the XOPEN SQLState conventions. The different values of this string are defined in the XOPEN SQL specification.
The database-specific vendor error code. This code is usually a
number you have to look up in the obscure reference section of your
database’s documentation. Fortunately, the error should be
sufficiently described through the Java
A chain of exceptions leading up to this one. This is one of the niftier features of this class. Specifically, if you get several errors during the execution of a transaction, they can be piggybacked in this class. This is frequently useful when you have exceptions that you want to inform the user of, but you do not want to ...