SQLException arising from the JDBC driver.
Indicates that an error occurred during a JDBC call.
SQLException
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private final SQLException |
| Access | Constructor and Description |
|---|---|
| public | JDBCException(String
The message explaining the exception condition message, SQLException The underlying cause cause)Constructs a |
| public | JDBCException(String
The message explaining the exception condition message, SQLException The underlying cause cause, String The sql being executed when the exception occurred sql)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The vendor specific error codeGet the vendor specific error code from the underlying |
| public String | |
| public String | Returns: The SQL statement; may return null.Get the actual SQL statement being executed when the exception occurred. |
| public SQLException | |
| public String | Returns: The X/Open or ANSI SQL SQLState error code; may return null.Get the X/Open or ANSI SQL SQLState error code from the underlying |
| message | back to summary |
|---|---|
| private final String message | |
| sql | back to summary |
|---|---|
| private final String sql | |
| sqlException | back to summary |
|---|---|
| private final SQLException sqlException | |
| JDBCException | back to summary |
|---|---|
| public JDBCException(String message, SQLException cause) Constructs a
| |
| JDBCException | back to summary |
|---|---|
| public JDBCException(String message, SQLException cause, String sql) Constructs a
| |
| getErrorCode | back to summary |
|---|---|
| public int getErrorCode() Get the vendor specific error code from the underlying
| |
| getErrorMessage | back to summary |
|---|---|
public String getErrorMessage()
| |
| getSQL | back to summary |
|---|---|
| public String getSQL() Get the actual SQL statement being executed when the exception occurred.
| |
| getSQLException | back to summary |
|---|---|
| public SQLException getSQLException() Get the underlying
| |
| getSQLState | back to summary |
|---|---|
| public String getSQLState() Get the X/Open or ANSI SQL SQLState error code from the underlying
| |