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

📄 preparedstatement.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
public void <B>setRef</B>(int&nbsp;i,                   <A HREF="../../java/sql/Ref.html">Ref</A>&nbsp;x)            throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given  <code>REF(&lt;structured-type&gt;)</code> value.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, ...<DD><CODE>x</CODE> - an SQL <code>REF</code> 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="setBlob(int, java.sql.Blob)"><!-- --></A><H3>setBlob</H3><PRE>public void <B>setBlob</B>(int&nbsp;i,                    <A HREF="../../java/sql/Blob.html">Blob</A>&nbsp;x)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given  <code>Blob</code> object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, ...<DD><CODE>x</CODE> - a <code>Blob</code> object that maps an SQL <code>BLOB</code> 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="setClob(int, java.sql.Clob)"><!-- --></A><H3>setClob</H3><PRE>public void <B>setClob</B>(int&nbsp;i,                    <A HREF="../../java/sql/Clob.html">Clob</A>&nbsp;x)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given  <code>Clob</code> object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, ...<DD><CODE>x</CODE> - a <code>Clob</code> object that maps an SQL <code>CLOB</code> 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="setArray(int, java.sql.Array)"><!-- --></A><H3>setArray</H3><PRE>public void <B>setArray</B>(int&nbsp;i,                     <A HREF="../../java/sql/Array.html">Array</A>&nbsp;x)              throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given  <code>Array</code> object. Sets an Array parameter.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the first parameter is 1, the second is 2, ...<DD><CODE>x</CODE> - an <code>Array</code> object that maps an SQL <code>ARRAY</code> 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="getMetaData()"><!-- --></A><H3>getMetaData</H3><PRE>public <A HREF="../../java/sql/ResultSetMetaData.html">ResultSetMetaData</A> <B>getMetaData</B>()                              throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Gets the number, types and properties of a <code>ResultSet</code> object's columns.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the description of a <code>ResultSet</code> object's columns<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="setDate(int, java.sql.Date, java.util.Calendar)"><!-- --></A><H3>setDate</H3><PRE>public void <B>setDate</B>(int&nbsp;parameterIndex,                    <A HREF="../../java/sql/Date.html">Date</A>&nbsp;x,                    <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given <code>java.sql.Date</code> value, using the given <code>Calendar</code> object.  The driver uses the <code>Calendar</code> object to construct an SQL <code>DATE</code> value, which the driver then sends to the database.  With a a <code>Calendar</code> object, the driver can calculate the date taking into account a custom timezone.  If no <code>Calendar</code> object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.<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<DD><CODE>cal</CODE> - the <code>Calendar</code> object the driver will use            to construct the date<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="setTime(int, java.sql.Time, java.util.Calendar)"><!-- --></A><H3>setTime</H3><PRE>public void <B>setTime</B>(int&nbsp;parameterIndex,                    <A HREF="../../java/sql/Time.html">Time</A>&nbsp;x,                    <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given <code>java.sql.Time</code> value, using the given <code>Calendar</code> object.  The driver uses the <code>Calendar</code> object to construct an SQL <code>TIME</code> value, which the driver then sends to the database.  With a a <code>Calendar</code> object, the driver can calculate the time taking into account a custom timezone.  If no <code>Calendar</code> object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.<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<DD><CODE>cal</CODE> - the <code>Calendar</code> object the driver will use            to construct the time<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="setTimestamp(int, java.sql.Timestamp, java.util.Calendar)"><!-- --></A><H3>setTimestamp</H3><PRE>public void <B>setTimestamp</B>(int&nbsp;parameterIndex,                         <A HREF="../../java/sql/Timestamp.html">Timestamp</A>&nbsp;x,                         <A HREF="../../java/util/Calendar.html">Calendar</A>&nbsp;cal)                  throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, using the given <code>Calendar</code> object.  The driver uses the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value, which the driver then sends to the database.  With a a <code>Calendar</code> object, the driver can calculate the timestamp taking into account a custom timezone.  If no <code>Calendar</code> object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.<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<DD><CODE>cal</CODE> - the <code>Calendar</code> object the driver will use            to construct the timestamp<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="setNull(int, int, java.lang.String)"><!-- --></A><H3>setNull</H3><PRE>public void <B>setNull</B>(int&nbsp;paramIndex,                    int&nbsp;sqlType,                    <A HREF="../../java/lang/String.html">String</A>&nbsp;typeName)             throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Sets the designated parameter to SQL <code>NULL</code>. This version of the method <code>setNull</code> should be used for user-defined types and REF type parameters.  Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and  named array types. <P><B>Note:</B> To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter.  In the case of a user-defined type  the name is the type name of the parameter itself.  For a REF  parameter, the name is the type name of the referenced type.  If  a JDBC driver does not need the type code or type name information,  it may ignore it.      Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.<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 <code>java.sql.Types</code><DD><CODE>typeName</CODE> - the fully-qualified name of an SQL user-defined type;  ignored if the parameter is not a user-defined type or REF<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><!-- ========= 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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PreparedStatement.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/sql/Driver.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/sql/Ref.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>  &nbsp;&nbsp;<A HREF="PreparedStatement.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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 + -