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

📄 preparedstatement.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DL><DD>Sets the designated parameter to SQL <code>NULL</code>. <P><B>Note:</B> You must specify the parameter's 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> - the SQL type code defined in <code>java.sql.Types</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="setBoolean(int, boolean)"><!-- --></A><H3>setBoolean</H3><PRE>public void <B>setBoolean</B>(int&nbsp;parameterIndex,                       boolean&nbsp;x)                throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>boolean</code> value. The driver converts this to an SQL <code>BIT</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setByte(int, byte)"><!-- --></A><H3>setByte</H3><PRE>public void <B>setByte</B>(int&nbsp;parameterIndex,                    byte&nbsp;x)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>byte</code> value.   The driver converts this to an SQL <code>TINYINT</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setShort(int, short)"><!-- --></A><H3>setShort</H3><PRE>public void <B>setShort</B>(int&nbsp;parameterIndex,                     short&nbsp;x)              throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>short</code> value.  The driver converts this to an SQL <code>SMALLINT</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setInt(int, int)"><!-- --></A><H3>setInt</H3><PRE>public void <B>setInt</B>(int&nbsp;parameterIndex,                   int&nbsp;x)            throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>int</code> value.   The driver converts this to an SQL <code>INTEGER</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setLong(int, long)"><!-- --></A><H3>setLong</H3><PRE>public void <B>setLong</B>(int&nbsp;parameterIndex,                    long&nbsp;x)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>long</code> value.  The driver converts this to an SQL <code>BIGINT</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setFloat(int, float)"><!-- --></A><H3>setFloat</H3><PRE>public void <B>setFloat</B>(int&nbsp;parameterIndex,                     float&nbsp;x)              throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>float</code> value.  The driver converts this to an SQL <code>FLOAT</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setDouble(int, double)"><!-- --></A><H3>setDouble</H3><PRE>public void <B>setDouble</B>(int&nbsp;parameterIndex,                      double&nbsp;x)               throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>double</code> value.   The driver converts this to an SQL <code>DOUBLE</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setBigDecimal(int, java.math.BigDecimal)"><!-- --></A><H3>setBigDecimal</H3><PRE>public void <B>setBigDecimal</B>(int&nbsp;parameterIndex,                          <A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;x)                   throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a <code>java.math.BigDecimal</code> value.   The driver converts this to an SQL <code>NUMERIC</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setString(int, java.lang.String)"><!-- --></A><H3>setString</H3><PRE>public void <B>setString</B>(int&nbsp;parameterIndex,                      <A HREF="../../java/lang/String.html">String</A>&nbsp;x)               throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java <code>String</code> value.  The driver converts this to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value (depending on the argument's size relative to the driver's limits on <code>VARCHAR</code> values) when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setBytes(int, byte[])"><!-- --></A><H3>setBytes</H3><PRE>public void <B>setBytes</B>(int&nbsp;parameterIndex,                     byte[]&nbsp;x)              throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a Java array of bytes.  The driver converts this to an SQL <code>VARBINARY</code> or <code>LONGVARBINARY</code> (depending on the argument's size relative to the driver's limits on <code>VARBINARY</code> values) when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setDate(int, java.sql.Date)"><!-- --></A><H3>setDate</H3><PRE>public void <B>setDate</B>(int&nbsp;parameterIndex,                    <A HREF="../../java/sql/Date.html">Date</A>&nbsp;x)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a <code<java.sql.Date</code> value.   The driver converts this to an SQL <code>DATE</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setTime(int, java.sql.Time)"><!-- --></A><H3>setTime</H3><PRE>public void <B>setTime</B>(int&nbsp;parameterIndex,                    <A HREF="../../java/sql/Time.html">Time</A>&nbsp;x)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a <code>java.sql.Time</code> value.   The driver converts this to an SQL <code>TIME</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setTimestamp(int, java.sql.Timestamp)"><!-- --></A><H3>setTimestamp</H3><PRE>public void <B>setTimestamp</B>(int&nbsp;parameterIndex,                         <A HREF="../../java/sql/Timestamp.html">Timestamp</A>&nbsp;x)                  throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to a <code>java.sql.Timestamp</code> value.   The driver converts this to an SQL <code>TIMESTAMP</code> value when it sends it to 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, ...<DD><CODE>x</CODE> - the parameter value<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="setAsciiStream(int, java.io.InputStream, int)"><!-- --></A><H3>setAsciiStream</H3><PRE>public void <B>setAsciiStream</B>(int&nbsp;parameterIndex,                           <A HREF="../../java/io/InputStream.html">InputStream</A>&nbsp;x,                           int&nbsp;length)                    throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given input stream, which will have  the specified number of bytes.

⌨️ 快捷键说明

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