<!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>
  Interface java.sql.CallableStatement
</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="Package-java.sql.html">Previous</a>  <a href="java.sql.Connection.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Interface java.sql.CallableStatement
</h1>
<dl>
  <dt> public interface <b>CallableStatement</b>
  <dt> extends <a href="java.sql.PreparedStatement.html#_top_">PreparedStatement</a>
</dl>
<P>CallableStatement is used to execute SQL stored procedures.
 <P>JDBC provides a stored procedure SQL escape that allows stored
 procedures to be called in a standard way for all RDBMS's. This
 escape syntax has one form that includes a result parameter and one
 that does not. If used, the result parameter must be registered as
 an OUT parameter. The other parameters may be used for input,
 output or both. Parameters are refered to sequentially, by
 number. The first parameter is 1.
 <P><CODE>
 {?= call <procedure-name>[<arg1>,<arg2>, ...]}<BR>
 {call <procedure-name>[<arg1>,<arg2>, ...]}
 </CODE>
 <P>IN parameter values are set using the set methods inherited from
 PreparedStatement. The type of all OUT parameters must be
 registered prior to executing the stored procedure; their values
 are retrieved after execution via the get methods provided here.
 <P>A Callable statement may return a ResultSet or multiple
 ResultSets. Multiple ResultSets are handled using operations
 inherited from Statement.
 <P>For maximum portability, a call's ResultSets and update counts
 should be processed prior to getting the values of output
 parameters.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.sql.Connection.html#prepareCall">prepareCall</a>, <a href="java.sql.ResultSet.html#_top_">ResultSet</a>
</dl>
<hr>
<a name="index"></a>
<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="#getBigDecimal(int, int)"><b>getBigDecimal</b></a>(int, int)
  <dd> 
 Get the value of a NUMERIC parameter as a java.math.BigDecimal object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBoolean(int)"><b>getBoolean</b></a>(int)
  <dd>  Get the value of a BIT parameter as a Java boolean.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getByte(int)"><b>getByte</b></a>(int)
  <dd>  Get the value of a TINYINT parameter as a Java byte.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBytes(int)"><b>getBytes</b></a>(int)
  <dd>  Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[]

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDate(int)"><b>getDate</b></a>(int)
  <dd>  Get the value of a SQL DATE parameter as a java.sql.Date object

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDouble(int)"><b>getDouble</b></a>(int)
  <dd>  Get the value of a DOUBLE parameter as a Java double.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFloat(int)"><b>getFloat</b></a>(int)
  <dd>  Get the value of a FLOAT parameter as a Java float.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getInt(int)"><b>getInt</b></a>(int)
  <dd>  Get the value of an INTEGER parameter as a Java int.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getLong(int)"><b>getLong</b></a>(int)
  <dd>  Get the value of a BIGINT parameter as a Java long.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getObject(int)"><b>getObject</b></a>(int)
  <dd>  Get the value of a parameter as a Java object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getShort(int)"><b>getShort</b></a>(int)
  <dd>  Get the value of a SMALLINT parameter as a Java short.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getString(int)"><b>getString</b></a>(int)
  <dd>  Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTime(int)"><b>getTime</b></a>(int)
  <dd>  Get the value of a SQL TIME parameter as a java.sql.Time object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimestamp(int)"><b>getTimestamp</b></a>(int)
  <dd>  Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#registerOutParameter(int, int)"><b>registerOutParameter</b></a>(int, int)
  <dd>  Before executing a stored procedure call, you must explicitly
 call registerOutParameter to register the java.sql.Type of each
 out parameter.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#registerOutParameter(int, int, int)"><b>registerOutParameter</b></a>(int, int, int)
  <dd>  Use this version of registerOutParameter for registering
 Numeric or Decimal out parameters.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#wasNull()"><b>wasNull</b></a>()
  <dd>  An OUT parameter may have the value of SQL NULL; wasNull reports 
 whether the last value read has this special value.
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="registerOutParameter(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="registerOutParameter"><b>registerOutParameter</b></a>
<pre>
 public abstract void registerOutParameter(int parameterIndex,
                                           int sqlType) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Before executing a stored procedure call, you must explicitly
 call registerOutParameter to register the java.sql.Type of each
 out parameter.
 <P><B>Note:</B> When reading the value of an out parameter, you
 must use the getXXX method whose Java type XXX corresponds to the
 parameter's registered SQL type.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2,...
    <dd> sqlType - SQL type code defined by java.sql.Types;
 for parameters of type Numeric or Decimal use the version of
 registerOutParameter that accepts a scale value
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
    <dt> <b>See Also:</b>
    <dd> Type
  </dl></dd>
</dl>
<a name="registerOutParameter(int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="registerOutParameter"><b>registerOutParameter</b></a>
<pre>
 public abstract void registerOutParameter(int parameterIndex,
                                           int sqlType,
                                           int scale) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Use this version of registerOutParameter for registering
 Numeric or Decimal out parameters.
 <P><B>Note:</B> When reading the value of an out parameter, you
 must use the getXXX method whose Java type XXX corresponds to the
 parameter's registered SQL type.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dd> sqlType - use either java.sql.Type.NUMERIC or java.sql.Type.DECIMAL
    <dd> scale - a value greater than or equal to zero representing the
              desired number of digits to the right of the decimal point
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
    <dt> <b>See Also:</b>
    <dd> Type
  </dl></dd>
</dl>
<a name="wasNull()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="wasNull"><b>wasNull</b></a>
<pre>
 public abstract boolean wasNull() throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> An OUT parameter may have the value of SQL NULL; wasNull reports 
 whether the last value read has this special value.
 <P><B>Note:</B> You must first call getXXX on a parameter to
 read its value and then call wasNull() to see if the value was
 SQL NULL.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if the last parameter read was SQL NULL
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getString(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getString"><b>getString</b></a>
<pre>
 public abstract <a href="java.lang.String.html#_top_">String</a> getString(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is null
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getBoolean(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBoolean"><b>getBoolean</b></a>
<pre>
 public abstract boolean getBoolean(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a BIT parameter as a Java boolean.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is false
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getByte(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getByte"><b>getByte</b></a>
<pre>
 public abstract byte getByte(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a TINYINT parameter as a Java byte.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is 0
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getShort(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getShort"><b>getShort</b></a>
<pre>
 public abstract short getShort(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a SMALLINT parameter as a Java short.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is 0
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getInt(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getInt"><b>getInt</b></a>
<pre>
 public abstract int getInt(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of an INTEGER parameter as a Java int.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is 0
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getLong(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getLong"><b>getLong</b></a>
<pre>
 public abstract long getLong(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a BIGINT parameter as a Java long.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is 0
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getFloat(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFloat"><b>getFloat</b></a>
<pre>
 public abstract float getFloat(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a FLOAT parameter as a Java float.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is 0
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getDouble(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDouble"><b>getDouble</b></a>
<pre>
 public abstract double getDouble(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a DOUBLE parameter as a Java double.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is 0
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getBigDecimal(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBigDecimal"><b>getBigDecimal</b></a>
<pre>
 public abstract <a href="java.math.BigDecimal.html#_top_">BigDecimal</a> getBigDecimal(int parameterIndex,
                                          int scale) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a NUMERIC parameter as a java.math.BigDecimal object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dd> scale - a value greater than or equal to zero representing the
 desired number of digits to the right of the decimal point
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is
 null
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getBytes(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBytes"><b>getBytes</b></a>
<pre>
 public abstract byte[] getBytes(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[]
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is null
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getDate(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDate"><b>getDate</b></a>
<pre>
 public abstract <a href="java.sql.Date.html#_top_">Date</a> getDate(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a SQL DATE parameter as a java.sql.Date object
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is null
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getTime(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTime"><b>getTime</b></a>
<pre>
 public abstract <a href="java.sql.Time.html#_top_">Time</a> getTime(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a SQL TIME parameter as a java.sql.Time object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is null
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getTimestamp(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimestamp"><b>getTimestamp</b></a>
<pre>
 public abstract <a href="java.sql.Timestamp.html#_top_">Timestamp</a> getTimestamp(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - the first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> the parameter value; if the value is SQL NULL, the result is null
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
  </dl></dd>
</dl>
<a name="getObject(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getObject"><b>getObject</b></a>
<pre>
 public abstract <a href="java.lang.Object.html#_top_">Object</a> getObject(int parameterIndex) throws <a href="java.sql.SQLException.html#_top_">SQLException</a>
</pre>
<dl>
  <dd> Get the value of a parameter as a Java object.
 <p>This method returns a Java object whose type coresponds to the SQL
 type that was registered for this parameter using registerOutParameter.
 <p>Note that this method may be used to read
 datatabase-specific, abstract data types. This is done by
 specifying a targetSqlType of java.sql.types.OTHER, which
 allows the driver to return a database-specific Java type.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> parameterIndex - The first parameter is 1, the second is 2, ...
    <dt> <b>Returns:</b>
    <dd> A java.lang.Object holding the OUT parameter value.
    <dt> <b>Throws:</b> <a href="java.sql.SQLException.html#_top_">SQLException</a>
    <dd> if a database-access error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="java.sql.Types.html#_top_">Types</a>
  </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="Package-java.sql.html">Previous</a>  <a href="java.sql.Connection.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
