rowset.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 1,617 行 · 第 1/5 页

HTML
1,617
字号
public void <B>setString</B>(int&nbsp;parameterIndex,
                      java.lang.String&nbsp;x)
               throws java.sql.SQLException</PRE>
<DL>
<DD>Set a parameter to a Java String value.<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>java.sql.SQLException</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 java.sql.SQLException</PRE>
<DL>
<DD>Set a parameter to a Java array of bytes.<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>java.sql.SQLException</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,
                    java.sql.Date&nbsp;x)
             throws java.sql.SQLException</PRE>
<DL>
<DD>Set a parameter to a java.sql.Date value.<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>java.sql.SQLException</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,
                    java.sql.Time&nbsp;x)
             throws java.sql.SQLException</PRE>
<DL>
<DD>Set a parameter to a java.sql.Time value.<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>java.sql.SQLException</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,
                         java.sql.Timestamp&nbsp;x)
                  throws java.sql.SQLException</PRE>
<DL>
<DD>Set a parameter to a java.sql.Timestamp value.<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>java.sql.SQLException</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,
                           java.io.InputStream&nbsp;x,
                           int&nbsp;length)
                    throws java.sql.SQLException</PRE>
<DL>
<DD>When a very large ASCII value is input to a LONGVARCHAR
 parameter, it may be more practical to send it via a
 java.io.InputStream. JDBC will read the data from the stream
 as needed, until it reaches end-of-file.   
 
 <P><B>Note:</B> This stream object can either be a standard
 Java stream object or your own subclass that implements the
 standard interface.<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 java input stream which contains the ASCII parameter value<DD><CODE>length</CODE> - the number of bytes in the stream<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="setBinaryStream(int, java.io.InputStream, int)"><!-- --></A><H3>
setBinaryStream</H3>
<PRE>
public void <B>setBinaryStream</B>(int&nbsp;parameterIndex,
                            java.io.InputStream&nbsp;x,
                            int&nbsp;length)
                     throws java.sql.SQLException</PRE>
<DL>
<DD>When a very large binary value is input to a LONGVARBINARY
 parameter, it may be more practical to send it via a
 java.io.InputStream. JDBC will read the data from the stream
 as needed, until it reaches end-of-file.
 
 <P><B>Note:</B> This stream object can either be a standard
 Java stream object or your own subclass that implements the
 standard interface.<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 java input stream which contains the binary parameter value<DD><CODE>length</CODE> - the number of bytes in the stream<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="setCharacterStream(int, java.io.Reader, int)"><!-- --></A><H3>
setCharacterStream</H3>
<PRE>
public void <B>setCharacterStream</B>(int&nbsp;parameterIndex,
                               java.io.Reader&nbsp;reader,
                               int&nbsp;length)
                        throws java.sql.SQLException</PRE>
<DL>
<DD>When a very large UNICODE value is input to a LONGVARCHAR
 parameter, it may be more practical to send it via a
 java.io.Reader. JDBC will read the data from the stream
 as needed, until it reaches end-of-file.  
 
 <P><B>Note:</B> This stream object can either be a standard
 Java stream object or your own subclass that implements the
 standard interface.<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 java reader which contains the UNICODE data<DD><CODE>length</CODE> - the number of characters in the stream<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="setObject(int, java.lang.Object, int, int)"><!-- --></A><H3>
setObject</H3>
<PRE>
public void <B>setObject</B>(int&nbsp;parameterIndex,
                      java.lang.Object&nbsp;x,
                      int&nbsp;targetSqlType,
                      int&nbsp;scale)
               throws java.sql.SQLException</PRE>
<DL>
<DD><p>Set the value of a parameter using an object; use the
 java.lang equivalent objects for integral values.

 <p>The given Java object will be converted to the targetSqlType
 before being sent to the database.

 If the object is of a class implementing SQLData,
 the rowset should call its method writeSQL() to write it 
 to the SQL data stream.
 else
 If the object is of a class implementing Ref, Blob, Clob, Struct, 
 or Array then pass it to the database as a value of the 
 corresponding SQL type.

 <p>Note that this method may be used to pass datatabase-
 specific abstract data types.<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 object containing the input parameter value<DD><CODE>targetSqlType</CODE> - The SQL type (as defined in java.sql.Types) to be 
 sent to the database. The scale argument may further qualify this type.<DD><CODE>scale</CODE> - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
          this is the number of digits after the decimal.  For all other
          types this value will be ignored,<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.<DT><B>See Also: </B><DD><CODE>Types</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setObject(int, java.lang.Object, int)"><!-- --></A><H3>
setObject</H3>
<PRE>
public void <B>setObject</B>(int&nbsp;parameterIndex,
                      java.lang.Object&nbsp;x,
                      int&nbsp;targetSqlType)
               throws java.sql.SQLException</PRE>
<DL>
<DD>This method is like setObject above, but the scale used is the scale
 of the second parameter.  Scalar values have a scale of zero.  Literal
 values have the scale present in the literal.  While it is supported, it 
 is not recommended that this method not be called with floating point 
 input values.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="setObject(int, java.lang.Object)"><!-- --></A><H3>
setObject</H3>
<PRE>
public void <B>setObject</B>(int&nbsp;parameterIndex,
                      java.lang.Object&nbsp;x)
               throws java.sql.SQLException</PRE>
<DL>
<DD><p>Set the value of a parameter using an object; use the
 java.lang equivalent objects for integral values.

 <p>The JDBC specification specifies a standard mapping from
 Java Object types to SQL types.  The given argument java object
 will be converted to the corresponding SQL type before being
 sent to the database.

 <p>Note that this method may be used to pass datatabase
 specific abstract data types, by using a Driver specific Java
 type.

 If the object is of a class implementing SQLData,
 the rowset should call its method writeSQL() to write it 
 to the SQL data stream.
 else
 If the object is of a class implementing Ref, Blob, Clob, Struct, 
 or Array then pass it to the database as a value of the 
 corresponding SQL type.

 Raise an exception if there is an ambiguity, for example, if the
 object is of a class implementing more than one of those interfaces.<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 object containing the input parameter value<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="setRef(int, java.sql.Ref)"><!-- --></A><H3>
setRef</H3>
<PRE>
public void <B>setRef</B>(int&nbsp;i,
                   java.sql.Ref&nbsp;x)
            throws java.sql.SQLException</PRE>
<DL>
<DD>Set a REF(&lt;structured-type&gt;) 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 object representing data of an SQL REF Type</DL>
</DD>
</DL>
<HR>

<A NAME="setBlob(int, java.sql.Blob)"><!-- --></A><H3>
setBlob</H3>
<PRE>
public void <B>setBlob</B>(int&nbsp;i,
                    java.sql.Blob&nbsp;x)
             throws java.sql.SQLException</PRE>
<DL>
<DD>Set a BLOB 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 object representing a BLOB</DL>
</DD>
</DL>
<HR>

<A NAME="setClob(int, java.sql.Clob)"><!-- --></A><H3>
setClob</H3>
<PRE>
public void <B>setClob</B>(int&nbsp;i,
                    java.sql.Clob&nbsp;x)
             throws java.sql.SQLException</PRE>
<DL>
<DD>Set a CLOB 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 object representing a CLOB</DL>
</DD>
</DL>
<HR>

<A NAME="setArray(int, java.sql.Array)"><!-- --></A><H3>
setArray</H3>
<PRE>
public void <B>setArray</B>(int&nbsp;i,
                     java.sql.Array&nbsp;x)
              throws java.sql.SQLException</PRE>
<DL>
<DD>Set 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 object representing an SQL array</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,
                    java.sql.Date&nbsp;x,
                    java.util.Calendar&nbsp;cal)
             throws java.sql.SQLException</PRE>
<DL>
<DD>Set a parameter to a java.sql.Date value.  The driver converts this
 to a SQL DATE 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<

⌨️ 快捷键说明

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