<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.sql.SQLException
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.sql.html">This Package</a>  <a href="java.sql.DataTruncation.html#_top_">Previous</a>  <a href="java.sql.SQLWarning.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.sql.SQLException
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.lang.Throwable.html#_top_">java.lang.Throwable</a>
           |
           +----<a href="java.lang.Exception.html#_top_">java.lang.Exception</a>
                   |
                   +----java.sql.SQLException
</pre>
<hr>
<dl>
  <dt> public class <b>SQLException</b>
  <dt> extends <a href="java.lang.Exception.html#_top_">Exception</a>
</dl>
<P>The SQLException class provides information on a database access
 error.
 <P>Each SQLException provides several kinds of information: 
 <UL>
   <LI> a string describing the error.  This is used as the Java Exception
       message, and is available via the getMesage() method
   <LI> A "SQLstate" string which follows the XOPEN SQLstate conventions.
       The values of the SQLState string as described in the XOPEN SQL spec.
   <LI> An integer error code that is vendor specific.  Normally this will
	 be the actual error code returned by the underlying database.
   <LI> A chain to a next Exception.  This can be used to provided additional
 	 error information.
 </UL>
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SQLException()"><b>SQLException</b></a>()
  <dd>  Construct an SQLException; reason defaults to null, SQLState
 defaults to null and vendorCode defaults to 0.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SQLException(java.lang.String)"><b>SQLException</b></a>(String)
  <dd>  Construct an SQLException with a reason; SQLState defaults to
 null and vendorCode defaults to 0.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SQLException(java.lang.String, java.lang.String)"><b>SQLException</b></a>(String, String)
  <dd>  Construct an SQLException with a reason and SQLState;
 vendorCode defaults to 0.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SQLException(java.lang.String, java.lang.String, int)"><b>SQLException</b></a>(String, String, int)
  <dd>  Construct a fully-specified SQLException  

 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getErrorCode()"><b>getErrorCode</b></a>()
  <dd>  Get the vendor specific exception code

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getNextException()"><b>getNextException</b></a>()
  <dd>  Get the exception chained to this one.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getSQLState()"><b>getSQLState</b></a>()
  <dd>  Get the SQLState

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setNextException(java.sql.SQLException)"><b>setNextException</b></a>(SQLException)
  <dd>  Add an SQLException to the end of the chain.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="SQLException"></a>
<a name="SQLException(java.lang.String, java.lang.String, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SQLException</b>
<pre>
 public SQLException(<a href="java.lang.String.html#_top_">String</a> reason,
                     <a href="java.lang.String.html#_top_">String</a> SQLState,
                     int vendorCode)
</pre>
<dl>
  <dd> Construct a fully-specified SQLException
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> reason - a description of the exception
    <dd> SQLState - an XOPEN code identifying the exception
    <dd> vendorCode - a database vendor specific exception code
  </dl></dd>
</dl>
<a name="SQLException(java.lang.String, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SQLException</b>
<pre>
 public SQLException(<a href="java.lang.String.html#_top_">String</a> reason,
                     <a href="java.lang.String.html#_top_">String</a> SQLState)
</pre>
<dl>
  <dd> Construct an SQLException with a reason and SQLState;
 vendorCode defaults to 0.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> reason - a description of the exception
    <dd> SQLState - an XOPEN code identifying the exception
  </dl></dd>
</dl>
<a name="SQLException(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SQLException</b>
<pre>
 public SQLException(<a href="java.lang.String.html#_top_">String</a> reason)
</pre>
<dl>
  <dd> Construct an SQLException with a reason; SQLState defaults to
 null and vendorCode defaults to 0.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> reason - a description of the exception
  </dl></dd>
</dl>
<a name="SQLException()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SQLException</b>
<pre>
 public SQLException()
</pre>
<dl>
  <dd> Construct an SQLException; reason defaults to null, SQLState
 defaults to null and vendorCode defaults to 0.
<p>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getSQLState()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getSQLState"><b>getSQLState</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getSQLState()
</pre>
<dl>
  <dd> Get the SQLState
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the SQLState value
  </dl></dd>
</dl>
<a name="getErrorCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getErrorCode"><b>getErrorCode</b></a>
<pre>
 public int getErrorCode()
</pre>
<dl>
  <dd> Get the vendor specific exception code
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the vendor's error code
  </dl></dd>
</dl>
<a name="getNextException()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getNextException"><b>getNextException</b></a>
<pre>
 public <a href="#_top_">SQLException</a> getNextException()
</pre>
<dl>
  <dd> Get the exception chained to this one.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next SQLException in the chain, null if none
  </dl></dd>
</dl>
<a name="setNextException(java.sql.SQLException)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setNextException"><b>setNextException</b></a>
<pre>
 public synchronized void setNextException(<a href="#_top_">SQLException</a> ex)
</pre>
<dl>
  <dd> Add an SQLException to the end of the chain.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ex - the new end of the SQLException chain
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.sql.html">This Package</a>  <a href="java.sql.DataTruncation.html#_top_">Previous</a>  <a href="java.sql.SQLWarning.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
