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

📄 preparedstatement.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
        <A HREF="../../java/sql/Clob.html">Clob</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to the given  <code>Clob</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/PreparedStatement.html#setDate(int, java.sql.Date)">setDate</A></B>(int&nbsp;parameterIndex,        <A HREF="../../java/sql/Date.html">Date</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a <code<java.sql.Date</code> value.</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/PreparedStatement.html#setDate(int, java.sql.Date, java.util.Calendar)">setDate</A></B>(int&nbsp;parameterIndex,        <A HREF="../../java/sql/Date.html">Date</A>&nbsp;x,        <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to the given <code>java.sql.Date</code> value, using the given <code>Calendar</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/PreparedStatement.html#setDouble(int, double)">setDouble</A></B>(int&nbsp;parameterIndex,          double&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a Java <code>double</code> value.</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/PreparedStatement.html#setFloat(int, float)">setFloat</A></B>(int&nbsp;parameterIndex,         float&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a Java <code>float</code> value.</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/PreparedStatement.html#setInt(int, int)">setInt</A></B>(int&nbsp;parameterIndex,       int&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a Java <code>int</code> value.</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/PreparedStatement.html#setLong(int, long)">setLong</A></B>(int&nbsp;parameterIndex,        long&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a Java <code>long</code> value.</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/PreparedStatement.html#setNull(int, int)">setNull</A></B>(int&nbsp;parameterIndex,        int&nbsp;sqlType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to SQL <code>NULL</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/PreparedStatement.html#setNull(int, int, java.lang.String)">setNull</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;Sets the designated parameter to SQL <code>NULL</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/PreparedStatement.html#setObject(int, java.lang.Object)">setObject</A></B>(int&nbsp;parameterIndex,          <A HREF="../../java/lang/Object.html">Object</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the designated parameter using the given 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/PreparedStatement.html#setObject(int, java.lang.Object, int)">setObject</A></B>(int&nbsp;parameterIndex,          <A HREF="../../java/lang/Object.html">Object</A>&nbsp;x,          int&nbsp;targetSqlType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the designated parameter with the given 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/PreparedStatement.html#setObject(int, java.lang.Object, int, int)">setObject</A></B>(int&nbsp;parameterIndex,          <A HREF="../../java/lang/Object.html">Object</A>&nbsp;x,          int&nbsp;targetSqlType,          int&nbsp;scale)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the designated parameter with the given 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/PreparedStatement.html#setRef(int, java.sql.Ref)">setRef</A></B>(int&nbsp;i,       <A HREF="../../java/sql/Ref.html">Ref</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to the given  <code>REF(&lt;structured-type&gt;)</code> value.</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/PreparedStatement.html#setShort(int, short)">setShort</A></B>(int&nbsp;parameterIndex,         short&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a Java <code>short</code> value.</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/PreparedStatement.html#setString(int, java.lang.String)">setString</A></B>(int&nbsp;parameterIndex,          <A HREF="../../java/lang/String.html">String</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a Java <code>String</code> value.</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/PreparedStatement.html#setTime(int, java.sql.Time)">setTime</A></B>(int&nbsp;parameterIndex,        <A HREF="../../java/sql/Time.html">Time</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a <code>java.sql.Time</code> value.</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/PreparedStatement.html#setTime(int, java.sql.Time, java.util.Calendar)">setTime</A></B>(int&nbsp;parameterIndex,        <A HREF="../../java/sql/Time.html">Time</A>&nbsp;x,        <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to the given <code>java.sql.Time</code> value, using the given <code>Calendar</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/PreparedStatement.html#setTimestamp(int, java.sql.Timestamp)">setTimestamp</A></B>(int&nbsp;parameterIndex,             <A HREF="../../java/sql/Timestamp.html">Timestamp</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to a <code>java.sql.Timestamp</code> value.</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/PreparedStatement.html#setTimestamp(int, java.sql.Timestamp, java.util.Calendar)">setTimestamp</A></B>(int&nbsp;parameterIndex,             <A HREF="../../java/sql/Timestamp.html">Timestamp</A>&nbsp;x,             <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, using the given <code>Calendar</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/PreparedStatement.html#setUnicodeStream(int, java.io.InputStream, int)">setUnicodeStream</A></B>(int&nbsp;parameterIndex,                 <A HREF="../../java/io/InputStream.html">InputStream</A>&nbsp;x,                 int&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I></I>&nbsp;</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="executeQuery()"><!-- --></A><H3>executeQuery</H3><PRE>public <A HREF="../../java/sql/ResultSet.html">ResultSet</A> <B>executeQuery</B>()                       throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Executes the SQL query in this <code>PreparedStatement</code> object and returns the result set generated by the query.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>ResultSet</code> object that contains the data produced by the query; never <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="executeUpdate()"><!-- --></A><H3>executeUpdate</H3><PRE>public int <B>executeUpdate</B>()                  throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Executes the SQL INSERT, UPDATE or DELETE statement in this <code>PreparedStatement</code> object. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>either the row count for INSERT, UPDATE or DELETE statements; or 0 for SQL statements that return nothing<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="setNull(int, int)"><!-- --></A><H3>setNull</H3><PRE>public void <B>setNull</B>(int&nbsp;parameterIndex,                    int&nbsp;sqlType)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE>

⌨️ 快捷键说明

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