📄 callablestatement.html
字号:
<code>i</code> and uses <code>map</code> for the custom mapping of the parameter value. <p> This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method <code>registerOutParameter</code>. By registering the target JDBC type as <code>java.sql.Types.OTHER</code>, this method can be used to read database-specific abstract data types.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, and so on<DD><CODE>map</CODE> - the mapping from SQL type names to Java classes<DT><B>Returns:</B><DD>a <code>java.lang.Object</code> holding the OUT parameter value<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="getRef(int)"><!-- --></A><H3>getRef</H3><PRE>public <A HREF="../../java/sql/Ref.html">Ref</A> <B>getRef</B>(int i) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>REF(<structured-type>)</code> parameter as a <A HREF="../../java/sql/Ref.html"><CODE>Ref</CODE></A> object in the Java programming language.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, and so on<DT><B>Returns:</B><DD>the parameter value as a <code>Ref</code> object in the Java programming language. If the value was SQL <code>NULL</code>, the value <code>null</code> is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="getBlob(int)"><!-- --></A><H3>getBlob</H3><PRE>public <A HREF="../../java/sql/Blob.html">Blob</A> <B>getBlob</B>(int i) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>BLOB</code> parameter as a <A HREF="../../java/sql/Blob.html"><CODE>Blob</CODE></A> object in the Java programming language.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, and so on<DT><B>Returns:</B><DD>the parameter value as a <code>Blob</code> object in the Java programming language. If the value was SQL <code>NULL</code>, the value <code>null</code> is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="getClob(int)"><!-- --></A><H3>getClob</H3><PRE>public <A HREF="../../java/sql/Clob.html">Clob</A> <B>getClob</B>(int i) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>CLOB</code> parameter as a <code>Clob</code> object in the Java programming language.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, and so on<DT><B>Returns:</B><DD>the parameter value as a <code>Clob</code> object in the Java programming language. If the value was SQL <code>NULL</code>, the value <code>null</code> is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="getArray(int)"><!-- --></A><H3>getArray</H3><PRE>public <A HREF="../../java/sql/Array.html">Array</A> <B>getArray</B>(int i) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>ARRAY</code> parameter as an <A HREF="../../java/sql/Array.html"><CODE>Array</CODE></A> object in the Java programming language.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, and so on<DT><B>Returns:</B><DD>the parameter value as an <code>Array</code> object in the Java programming language. If the value was SQL <code>NULL</code>, the value <code>null</code> is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><HR><A NAME="getDate(int, java.util.Calendar)"><!-- --></A><H3>getDate</H3><PRE>public <A HREF="../../java/sql/Date.html">Date</A> <B>getDate</B>(int parameterIndex, <A HREF="../../java/util/Calendar.html">Calendar</A> cal) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>DATE</code> parameter as a <code>java.sql.Date</code> object, using the given <code>Calendar</code> object to construct the date. With a <code>Calendar</code> object, the driver can calculate the date taking into account a custom timezone and locale. If no <code>Calendar</code> object is specified, the driver uses the default timezone and locale.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>parameterIndex</CODE> - the first parameter is 1, the second is 2, and so on<DD><CODE>cal</CODE> - the <code>Calendar</code> object the driver will use to construct the date<DT><B>Returns:</B><DD>the parameter value. If the value is SQL <code>NULL</code>, the result is <code>null</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="getTime(int, java.util.Calendar)"><!-- --></A><H3>getTime</H3><PRE>public <A HREF="../../java/sql/Time.html">Time</A> <B>getTime</B>(int parameterIndex, <A HREF="../../java/util/Calendar.html">Calendar</A> cal) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>TIME</code> parameter as a <code>java.sql.Time</code> object, using the given <code>Calendar</code> object to construct the time. With a <code>Calendar</code> object, the driver can calculate the time taking into account a custom timezone and locale. If no <code>Calendar</code> object is specified, the driver uses the default timezone and locale.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>parameterIndex</CODE> - the first parameter is 1, the second is 2, and so on<DD><CODE>cal</CODE> - the <code>Calendar</code> object the driver will use to construct the time<DT><B>Returns:</B><DD>the parameter value; if the value is SQL <code>NULL</code>, the result is <code>null</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="getTimestamp(int, java.util.Calendar)"><!-- --></A><H3>getTimestamp</H3><PRE>public <A HREF="../../java/sql/Timestamp.html">Timestamp</A> <B>getTimestamp</B>(int parameterIndex, <A HREF="../../java/util/Calendar.html">Calendar</A> cal) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the value of a JDBC <code>TIMESTAMP</code> parameter as a <code>java.sql.Timestamp</code> object, using the given <code>Calendar</code> object to construct the <code>Timestamp</code> object. With a <code>Calendar</code> object, the driver can calculate the timestamp taking into account a custom timezone and locale. If no <code>Calendar</code> object is specified, the driver uses the default timezone and locale.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>parameterIndex</CODE> - the first parameter is 1, the second is 2, and so on<DD><CODE>cal</CODE> - the <code>Calendar</code> object the driver will use to construct the timestamp<DT><B>Returns:</B><DD>the parameter value. If the value is SQL <code>NULL</code>, the result is <code>null</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs</DL></DD></DL><HR><A NAME="registerOutParameter(int, int, java.lang.String)"><!-- --></A><H3>registerOutParameter</H3><PRE>public void <B>registerOutParameter</B>(int paramIndex, int sqlType, <A HREF="../../java/lang/String.html">String</A> typeName) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Registers the designated output parameter. This version of the method <code>registerOutParameter</code> should be used for a user-named or REF output parameter. Examples of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types. Before executing a stored procedure call, you must explicitly call <code>registerOutParameter</code> to register the type from <code>java.sql.Types</code> for each OUT parameter. For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type, the typeName parameter is ignored. <P><B>Note:</B> When reading the value of an out parameter, you must use the <code>getXXX</code> method whose Java type XXX corresponds to the parameter's registered SQL type.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>parameterIndex</CODE> - the first parameter is 1, the second is 2,...<DD><CODE>sqlType</CODE> - a value from <A HREF="../../java/sql/Types.html"><CODE>Types</CODE></A><DD><CODE>typeName</CODE> - the fully-qualified name of an SQL structured type<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/sql/Types.html"><CODE>Types</CODE></A>, <a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CallableStatement.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/sql/Blob.html"><B>PREV CLASS</B></A> <A HREF="../../java/sql/Clob.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CallableStatement.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -