⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callablestatement.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an object representing the value of OUT parameter  <code>i</code> and uses <code>map</code> for the custom mapping of the parameter value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/sql/Ref.html">Ref</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getRef(int)">getRef</A></B>(int&nbsp;i)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the value of a JDBC <code>REF(&lt;structured-type&gt;)</code> parameter as a <A HREF="../../java/sql/Ref.html"><CODE>Ref</CODE></A> object in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getShort(int)">getShort</A></B>(int&nbsp;parameterIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the value of a JDBC <code>SMALLINT</code> parameter as a <code>short</code> in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getString(int)">getString</A></B>(int&nbsp;parameterIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the value of a JDBC <code>CHAR</code>, <code>VARCHAR</code>,  or <code>LONGVARCHAR</code> parameter as a <code>String</code> in  the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/sql/Time.html">Time</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getTime(int)">getTime</A></B>(int&nbsp;parameterIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the value of a JDBC <code>TIME</code> parameter as a  <code>java.sql.Time</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/sql/Time.html">Time</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getTime(int, java.util.Calendar)">getTime</A></B>(int&nbsp;parameterIndex,        <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/sql/Timestamp.html">Timestamp</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getTimestamp(int)">getTimestamp</A></B>(int&nbsp;parameterIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the value of a JDBC <code>TIMESTAMP</code> parameter as a  <code>java.sql.Timestamp</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/sql/Timestamp.html">Timestamp</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#getTimestamp(int, java.util.Calendar)">getTimestamp</A></B>(int&nbsp;parameterIndex,             <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#registerOutParameter(int, int)">registerOutParameter</A></B>(int&nbsp;parameterIndex,                     int&nbsp;sqlType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the OUT parameter in ordinal position  <code>parameterIndex</code> to the JDBC type  <code>sqlType</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#registerOutParameter(int, int, int)">registerOutParameter</A></B>(int&nbsp;parameterIndex,                     int&nbsp;sqlType,                     int&nbsp;scale)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the parameter in ordinal position <code>parameterIndex</code> to be of JDBC type <code>sqlType</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#registerOutParameter(int, int, java.lang.String)">registerOutParameter</A></B>(int&nbsp;paramIndex,                     int&nbsp;sqlType,                     <A HREF="../../java/lang/String.html">String</A>&nbsp;typeName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the designated output parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/CallableStatement.html#wasNull()">wasNull</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether or not the last OUT parameter read had the value of SQL <code>NULL</code>.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.sql.PreparedStatement"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.sql.<A HREF="../../java/sql/PreparedStatement.html">PreparedStatement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/sql/PreparedStatement.html#addBatch()">addBatch</A>, <A HREF="../../java/sql/PreparedStatement.html#clearParameters()">clearParameters</A>, <A HREF="../../java/sql/PreparedStatement.html#execute()">execute</A>, <A HREF="../../java/sql/PreparedStatement.html#executeQuery()">executeQuery</A>, <A HREF="../../java/sql/PreparedStatement.html#executeUpdate()">executeUpdate</A>, <A HREF="../../java/sql/PreparedStatement.html#getMetaData()">getMetaData</A>, <A HREF="../../java/sql/PreparedStatement.html#setArray(int, java.sql.Array)">setArray</A>, <A HREF="../../java/sql/PreparedStatement.html#setAsciiStream(int, java.io.InputStream, int)">setAsciiStream</A>, <A HREF="../../java/sql/PreparedStatement.html#setBigDecimal(int, java.math.BigDecimal)">setBigDecimal</A>, <A HREF="../../java/sql/PreparedStatement.html#setBinaryStream(int, java.io.InputStream, int)">setBinaryStream</A>, <A HREF="../../java/sql/PreparedStatement.html#setBlob(int, java.sql.Blob)">setBlob</A>, <A HREF="../../java/sql/PreparedStatement.html#setBoolean(int, boolean)">setBoolean</A>, <A HREF="../../java/sql/PreparedStatement.html#setByte(int, byte)">setByte</A>, <A HREF="../../java/sql/PreparedStatement.html#setBytes(int, byte[])">setBytes</A>, <A HREF="../../java/sql/PreparedStatement.html#setCharacterStream(int, java.io.Reader, int)">setCharacterStream</A>, <A HREF="../../java/sql/PreparedStatement.html#setClob(int, java.sql.Clob)">setClob</A>, <A HREF="../../java/sql/PreparedStatement.html#setDate(int, java.sql.Date)">setDate</A>, <A HREF="../../java/sql/PreparedStatement.html#setDate(int, java.sql.Date, java.util.Calendar)">setDate</A>, <A HREF="../../java/sql/PreparedStatement.html#setDouble(int, double)">setDouble</A>, <A HREF="../../java/sql/PreparedStatement.html#setFloat(int, float)">setFloat</A>, <A HREF="../../java/sql/PreparedStatement.html#setInt(int, int)">setInt</A>, <A HREF="../../java/sql/PreparedStatement.html#setLong(int, long)">setLong</A>, <A HREF="../../java/sql/PreparedStatement.html#setNull(int, int)">setNull</A>, <A HREF="../../java/sql/PreparedStatement.html#setNull(int, int, java.lang.String)">setNull</A>, <A HREF="../../java/sql/PreparedStatement.html#setObject(int, java.lang.Object)">setObject</A>, <A HREF="../../java/sql/PreparedStatement.html#setObject(int, java.lang.Object, int)">setObject</A>, <A HREF="../../java/sql/PreparedStatement.html#setObject(int, java.lang.Object, int, int)">setObject</A>, <A HREF="../../java/sql/PreparedStatement.html#setRef(int, java.sql.Ref)">setRef</A>, <A HREF="../../java/sql/PreparedStatement.html#setShort(int, short)">setShort</A>, <A HREF="../../java/sql/PreparedStatement.html#setString(int, java.lang.String)">setString</A>, <A HREF="../../java/sql/PreparedStatement.html#setTime(int, java.sql.Time)">setTime</A>, <A HREF="../../java/sql/PreparedStatement.html#setTime(int, java.sql.Time, java.util.Calendar)">setTime</A>, <A HREF="../../java/sql/PreparedStatement.html#setTimestamp(int, java.sql.Timestamp)">setTimestamp</A>, <A HREF="../../java/sql/PreparedStatement.html#setTimestamp(int, java.sql.Timestamp, java.util.Calendar)">setTimestamp</A>, <A HREF="../../java/sql/PreparedStatement.html#setUnicodeStream(int, java.io.InputStream, int)">setUnicodeStream</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.sql.Statement"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.sql.<A HREF="../../java/sql/Statement.html">Statement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/sql/Statement.html#addBatch(java.lang.String)">addBatch</A>, <A HREF="../../java/sql/Statement.html#cancel()">cancel</A>, <A HREF="../../java/sql/Statement.html#clearBatch()">clearBatch</A>, <A HREF="../../java/sql/Statement.html#clearWarnings()">clearWarnings</A>, <A HREF="../../java/sql/Statement.html#close()">close</A>, <A HREF="../../java/sql/Statement.html#execute(java.lang.String)">execute</A>, <A HREF="../../java/sql/Statement.html#executeBatch()">executeBatch</A>, <A HREF="../../java/sql/Statement.html#executeQuery(java.lang.String)">executeQuery</A>, <A HREF="../../java/sql/Statement.html#executeUpdate(java.lang.String)">executeUpdate</A>, <A HREF="../../java/sql/Statement.html#getConnection()">getConnection</A>, <A HREF="../../java/sql/Statement.html#getFetchDirection()">getFetchDirection</A>, <A HREF="../../java/sql/Statement.html#getFetchSize()">getFetchSize</A>, <A HREF="../../java/sql/Statement.html#getMaxFieldSize()">getMaxFieldSize</A>, <A HREF="../../java/sql/Statement.html#getMaxRows()">getMaxRows</A>, <A HREF="../../java/sql/Statement.html#getMoreResults()">getMoreResults</A>, <A HREF="../../java/sql/Statement.html#getQueryTimeout()">getQueryTimeout</A>, <A HREF="../../java/sql/Statement.html#getResultSet()">getResultSet</A>, <A HREF="../../java/sql/Statement.html#getResultSetConcurrency()">getResultSetConcurrency</A>, <A HREF="../../java/sql/Statement.html#getResultSetType()">getResultSetType</A>, <A HREF="../../java/sql/Statement.html#getUpdateCount()">getUpdateCount</A>, <A HREF="../../java/sql/Statement.html#getWarnings()">getWarnings</A>, <A HREF="../../java/sql/Statement.html#setCursorName(java.lang.String)">setCursorName</A>, <A HREF="../../java/sql/Statement.html#setEscapeProcessing(boolean)">setEscapeProcessing</A>, <A HREF="../../java/sql/Statement.html#setFetchDirection(int)">setFetchDirection</A>, <A HREF="../../java/sql/Statement.html#setFetchSize(int)">setFetchSize</A>, <A HREF="../../java/sql/Statement.html#setMaxFieldSize(int)">setMaxFieldSize</A>, <A HREF="../../java/sql/Statement.html#setMaxRows(int)">setMaxRows</A>, <A HREF="../../java/sql/Statement.html#setQueryTimeout(int)">setQueryTimeout</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="registerOutParameter(int, int)"><!-- --></A><H3>registerOutParameter</H3><PRE>public void <B>registerOutParameter</B>(int&nbsp;parameterIndex,                                 int&nbsp;sqlType)                          throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Registers the OUT parameter in ordinal position  <code>parameterIndex</code> to the JDBC type  <code>sqlType</code>.  All OUT parameters must be registered before a stored procedure is executed. <p> The JDBC type specified by <code>sqlType</code> for an OUT parameter determines the Java type that must be used in the <code>get</code> method to read the value of that parameter. <p> If the JDBC type expected to be returned to this output parameter is specific to this particular database, <code>sqlType</code> should be <code>java.sql.Types.OTHER</code>.  The method  <A HREF="../../java/sql/CallableStatement.html#getObject(int)"><CODE>getObject(int)</CODE></A> retrieves the value.<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>sqlType</CODE> - the JDBC type code defined by <code>java.sql.Types</code>. If the parameter is of JDBC type <code>NUMERIC</code> or <code>DECIMAL</code>, the version of <code>registerOutParameter</code> that accepts a scale value  should be used.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>See Also: </B><DD><A HREF="../../java/sql/Types.html"><CODE>Types</CODE></A></DL></DD></DL><HR><A NAME="registerOutParameter(int, int, int)"><!-- --></A><H3>registerOutParameter</H3><PRE>public void <B>registerOutParameter</B>(int&nbsp;parameterIndex,                                 int&nbsp;sqlType,                                 int&nbsp;scale)                          throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Registers the parameter in ordinal position <code>parameterIndex</code> to be of JDBC type <code>sqlType</code>.  This method must be called before a stored procedure is executed. <p> The JDBC type specified by <code>sqlType</code> for an OUT parameter determines the Java type that must be used in the <code>get</code> method to read the value of that parameter. <p> This version of <code>registerOutParameter</code> should be used when the parameter is of JDBC type <code>NUMERIC</code> or <code>DECIMAL</code>.<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>sqlType</CODE> - SQL type code defined by <code>java.sql.Types</code>.<DD><CODE>scale</CODE> - the desired number of digits to the right of the decimal point.  It must be greater than or equal to zero.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if a database access error occurs<DT><B>See Also: </B><DD><A HREF="../../java/sql/Types.html"><CODE>Types</CODE></A></DL></DD></DL><HR><A NAME="wasNull()"><!-- --></A><H3>wasNull</H3><PRE>public boolean <B>wasNull</B>()                throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Indicates whether or not the last OUT parameter read had the value of SQL <code>NULL</code>.  Note that this method should be called only after calling a <code>getXXX</code> method; otherwise, there is no value to use in  determining whether it is <code>null</code> or not.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD><code>true</code> if the last parameter read was SQL <code>NULL</code>; <code>false</code> otherwise<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="getString(int)"><!-- --></A><H3>getString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getString</B>(int&nbsp;parameterIndex)                 throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Retrieves the value of a JDBC <code>CHAR</code>, <code>VARCHAR</code>,  or <code>LONGVARCHAR</code> parameter as a <code>String</code> in  the Java programming language. <p> For the fixed-length type JDBC <code>CHAR</code>, the <code>String</code> object returned has exactly the same value the JDBC <code>CHAR</code> value had in the database, including any padding added by the database.<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<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="getBoolean(int)"><!-- --></A><H3>getBoolean</H3><PRE>public boolean <B>getBoolean</B>(int&nbsp;parameterIndex)                   throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -