Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.sql.SQLException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----java.sql.SQLException

public class SQLException
extends Exception

The SQLException class provides information on a database access error.

Each SQLException provides several kinds of information:

  • a string describing the error. This is used as the Java Exception message, and is available via the getMesage() method
  • A "SQLstate" string which follows the XOPEN SQLstate conventions. The values of the SQLState string as described in the XOPEN SQL spec.
  • An integer error code that is vendor specific. Normally this will be the actual error code returned by the underlying database.
  • A chain to a next Exception. This can be used to provided additional error information.


Constructor Index

 o SQLException()
Construct an SQLException; reason defaults to null, SQLState defaults to null and vendorCode defaults to 0.
 o SQLException(String)
Construct an SQLException with a reason; SQLState defaults to null and vendorCode defaults to 0.
 o SQLException(String, String)
Construct an SQLException with a reason and SQLState; vendorCode defaults to 0.
 o SQLException(String, String, int)
Construct a fully-specified SQLException

Method Index

 o getErrorCode()
Get the vendor specific exception code
 o getNextException()
Get the exception chained to this one.
 o getSQLState()
Get the SQLState
 o setNextException(SQLException)
Add an SQLException to the end of the chain.

Constructors

 o SQLException
 public SQLException(String reason,
                     String SQLState,
                     int vendorCode)
Construct a fully-specified SQLException

Parameters:
reason - a description of the exception
SQLState - an XOPEN code identifying the exception
vendorCode - a database vendor specific exception code
 o SQLException
 public SQLException(String reason,
                     String SQLState)
Construct an SQLException with a reason and SQLState; vendorCode defaults to 0.

Parameters:
reason - a description of the exception
SQLState - an XOPEN code identifying the exception
 o SQLException
 public SQLException(String reason)
Construct an SQLException with a reason; SQLState defaults to null and vendorCode defaults to 0.

Parameters:
reason - a description of the exception
 o SQLException
 public SQLException()
Construct an SQLException; reason defaults to null, SQLState defaults to null and vendorCode defaults to 0.

Methods

 o getSQLState
 public String getSQLState()
Get the SQLState

Returns:
the SQLState value
 o getErrorCode
 public int getErrorCode()
Get the vendor specific exception code

Returns:
the vendor's error code
 o getNextException
 public SQLException getNextException()
Get the exception chained to this one.

Returns:
the next SQLException in the chain, null if none
 o setNextException
 public synchronized void setNextException(SQLException ex)
Add an SQLException to the end of the chain.

Parameters:
ex - the new end of the SQLException chain

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Submit a bug or feature


With any suggestions or questions please feel free to contact us