java.lang.Object | |||
↳ | java.lang.Throwable | ||
↳ | java.lang.Exception | ||
↳ | java.sql.SQLException |
Known Direct Subclasses |
Known Indirect Subclasses |
An Exception
class that is used in conjunction with JDBC operations.
It provides information about problems encountered with database access and
other problems related to JDBC
The SQLException
class provides the following information:
String
SQLState
string. This is an error description string which
follows either the SQL 99 conventions or the X/OPEN SQLstate
conventions. The potential values of the SQLState
string are
described in each of the specifications. Which of the conventions is being
used by the SQLState
string can be discovered by using the getSQLStateType
method of the DatabaseMetaData
interface.Exception
, if relevant, which can give access
to additional error information.Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an
SQLException object. | |||||||||||
Creates an
SQLException object. | |||||||||||
Creates an
SQLException object. | |||||||||||
Creates an
SQLException object. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the integer error code for this
SQLException . | |||||||||||
Retrieves the
SQLException chained to this SQLException ,
if any. | |||||||||||
Retrieves the
SQLState description string for this SQLException object. | |||||||||||
Adds the SQLException to the end of this
SQLException chain. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Throwable
| |||||||||||
From class java.lang.Object
|
Creates an SQLException
object. The reason string is set to
null
, the SQLState
string is set to null
and the
error code is set to 0.
Creates an SQLException
object. The reason string is set to the given
reason string, the SQLState
string is set to null
and the error code is
set to 0.
theReason | the string to use as the Reason string |
---|
Creates an SQLException
object. The reason string is set to the
given reason string, the SQLState
string is set to the given
SQLState
string and the error code is set to 0.
theReason | the string to use as the reason string. |
---|---|
theSQLState | the string to use as the SQLState string.
|
Creates an SQLException
object. The reason string is set to the
given reason string, the SQLState
string is set to the given
SQLState
string and the error code is set to the given error code
value.
theReason | the string to use as the reason string. |
---|---|
theSQLState | the string to use as the SQLState string. |
theErrorCode | the integer value for the error code. |
Returns the integer error code for this SQLException
.
SQLException
. The meaning
of the code is specific to the vendor of the database.
Retrieves the SQLException
chained to this SQLException
,
if any.
SQLException
chained to this SQLException
.
null
if there is no SQLException
chained to this
SQLException
.
Retrieves the SQLState
description string for this SQLException
object.
SQLState
string for this SQLException
object.
This is an error description string which follows either the SQL
99 conventions or the X/OPEN SQLstate
conventions. The
potential values of the SQLState
string are described in
each of the specifications. Which of the conventions is being
used by the SQLState
string can be discovered by using
the getSQLStateType
method of the DatabaseMetaData
interface.
Adds the SQLException to the end of this SQLException
chain.
ex | the new SQLException to be added to the end of the
chain.
|
---|