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

📄 oracle.jdbc.driver.oraclepreparedstatement.html

📁 Oracle JDBC 的javaDoc
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<dl><dd><b> Note: setUnicodeStream() is deprecated.</b><p>  <dd> Sets the designated parameter to the given input stream, which will have the specified number of bytes.When a very large UNICODE value is input to a LONGparameter, it may be more practical to send it via ajava.io.InputStream. JDBC will read the data from the streamas needed, until it reaches end-of-file.  The JDBC driver willdo any necessary conversion from UNICODE to the database char format.The byte format of the Unicode stream is the 2 bytes UCS-2 encoding.<P><B>Note:</B> There are restrictions to use this method for CLOBs.Please see details in Oracle JDBC documents or Readme to avoiddata lossage.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the java input stream which contains theUNICODE parameter value    <dd> length - the number of bytes in the stream    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setCustomDatum(int, oracle.sql.CustomDatum)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setCustomDatum"><b>setCustomDatum</b></a><pre> public synchronized void setCustomDatum(int paramIndex,                                         <a href="oracle.sql.CustomDatum.html#_top_">CustomDatum</a> x) throws SQLException</pre><dl>  <dd> Oracle specific.Sets the designated parameter to a oracle.sql.CustomDatum value.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the parameter value    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setObject(int, java.lang.Object, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setObject"><b>setObject</b></a><pre> public synchronized void setObject(int paramIndex,                                    Object x,                                    int targetSqlType,                                    int scale) throws SQLException</pre><dl>  <dd> <p>Sets the value of a parameter using an object. The secondargument must be an object type.<p>The given Java object will be converted to the targetSqlTypebefore being sent to the database.If the object has a custom mapping (is of a class implementing SQLData),the JDBC driver should call its method <code>writeSQL</code> to write it to the SQL data stream.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the object containing the input parameter value    <dd> targetSqlType - the SQL type (as defined in java.sql.Typesor OracleTypes) to be sent to the database.    <dd> scale - for numeric types. Ignored for other types.    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs    <dt> <b>See Also:</b>    <dd> Types  </dl></dd></dl><a name="setObject(int, java.lang.Object, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setObject"><b>setObject</b></a><pre> public void setObject(int paramIndex,                       Object x,                       int targetSqlType) throws SQLException</pre><dl>  <dd> Sets the value of the designated parameter with the given object.This method is like setObject above, except that it assumes a scale of zero.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the object containing the input parameter value    <dd> targetSqlType - the SQL type (as defined in java.sql.Types) to besent to the database    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setRefType(int, oracle.sql.REF)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setRefType"><b>setRefType</b></a><pre> public void setRefType(int paramIndex,                        <a href="oracle.sql.REF.html#_top_">REF</a> ref) throws SQLException</pre><dl>  <dd> Oracle specific.Sets the designated parameter to a oracle.sql.REF value.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the parameter value    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setRef(int, oracle.jdbc2.Ref)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setRef"><b>setRef</b></a><pre> public synchronized void setRef(int paramIndex,                                 Ref ref) throws SQLException</pre><dl>  <dd> JDBC 2.0Sets a Ref(&lt;structured-type&gt;) parameter.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> i - the first parameter is 1, the second is 2, ...    <dd> x - an object representing data of an SQL REF Type    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setREF(int, oracle.sql.REF)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setREF"><b>setREF</b></a><pre> public synchronized void setREF(int paramIndex,                                 <a href="oracle.sql.REF.html#_top_">REF</a> ref) throws SQLException</pre><dl>  <dd> Oracle specific.Sets the designated parameter to a oracle.sql.REF value.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the parameter value    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setObject(int, java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setObject"><b>setObject</b></a><pre> public synchronized void setObject(int paramIndex,                                    Object x) throws SQLException</pre><dl>  <dd> Sets the value of the designated parameter with the given object.This method is like setObject above, except that it finds out the SQL type base on the given object's type.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the object containing the input parameter value    <dd> targetSqlType - the SQL type (as defined in java.sql.Types) to besent to the database    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setOracleObject(int, oracle.jdbc.driver.Datum)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setOracleObject"><b>setOracleObject</b></a><pre> public synchronized void setOracleObject(int paramIndex,                                          Datum x) throws SQLException</pre><dl>  <dd> Oracle specific.Sets the designated parameter to a oracle.sql.Datum value.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the parameter value    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="clearParameters()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="clearParameters"><b>clearParameters</b></a><pre> public synchronized void clearParameters() throws SQLException</pre><dl>  <dd> <P>In general, parameter values remain in force for repeated use of aStatement. Setting a parameter value automatically clears itsprevious value.  However, in some cases it is useful to immediatelyrelease the resources used by the current parameter values; this canbe done by calling clearParameters.<p></dl><a name="setCharacterStream(int, java.io.Reader, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setCharacterStream"><b>setCharacterStream</b></a><pre> public void setCharacterStream(int paramIndex,                                Reader reader,                                int length) throws SQLException</pre><dl>  <dd> JDBC 2.0Sets the designated parameter to the given <code>Reader</code>object, which is the given number of characters long.When a very large UNICODE value is input to a LONGparameter, it may be more practical to send it via ajava.io.Reader. JDBC will read the data from the streamas needed, until it reaches end-of-file.  The JDBC driver willdo any necessary conversion from UNICODE to the database char format.<P><B>Note:</B> There are restrictions to use this method to access CLOBs in database. To avoid data lossage, please readOracle JDBC documents or Reademe for details.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> x - the java reader which contains the UNICODE data    <dd> length - the number of characters in the stream    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setDate(int, java.sql.Date, java.util.Calendar)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setDate"><b>setDate</b></a><pre> public void setDate(int paramIndex,                     Date x,                     Calendar cal) throws SQLException</pre><dl>  <dd> JDBC 2.0Sets the designated parameter to a java.sql.Date value,using the given <code>Calendar</code> object. Since Oracle databasedoesn't support timezone for DATE. This method set the samevalue as setDate(idx, x).<p></dl><a name="setTime(int, java.sql.Time, java.util.Calendar)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setTime"><b>setTime</b></a><pre> public void setTime(int paramIndex,                     Time x,                     Calendar cal) throws SQLException</pre><dl>  <dd> JDBC 2.0Sets the designated parameter to a java.sql.Time value,using the given <code>Calendar</code> object. Since Oracle databasedoesn't support timezone for DATE. This method set the samevalue as setTime(idx, x).<p></dl><a name="setTimestamp(int, java.sql.Timestamp, java.util.Calendar)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setTimestamp"><b>setTimestamp</b></a><pre> public void setTimestamp(int paramIndex,                          Timestamp x,                          Calendar cal) throws SQLException</pre><dl>  <dd> JDBC 2.0Sets the designated parameter to a java.sql.Timestamp value,using the given <code>Calendar</code> object. Since Oracle databasedoesn't support timezone for DATE. This method set the samevalue as setTimestamp(idx, x).<p></dl><a name="addBatch()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="addBatch"><b>addBatch</b></a><pre> public synchronized void addBatch() throws SQLException</pre><dl>  <dd> Add a set of parameters to the batch.<p>  <dd><dl>    <dt> <b>Throws:</b> SQLException    <dd> if an error occurred.  </dl></dd></dl><a name="addBatch(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="addBatch"><b>addBatch</b></a><pre> public synchronized void addBatch(String sql) throws SQLException</pre><dl>  <dd> This method cannot be used in OraclePreparedStatement.<p>  <dd><dl>    <dt> <b>Overrides:</b>    <dd> <a href="oracle.jdbc.driver.OracleStatement.html#addBatch(java.lang.String)">addBatch</a> in class <a href="oracle.jdbc.driver.OracleStatement.html#_top_">OracleStatement</a>  </dl></dd></dl><a name="clearBatch()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="clearBatch"><b>clearBatch</b></a><pre> public synchronized void clearBatch() throws SQLException</pre><dl>  <dd> Make the set of parameters in the current batch empty.<p>  <dd><dl>    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurred.    <dt> <b>Overrides:</b>    <dd> <a href="oracle.jdbc.driver.OracleStatement.html#clearBatch()">clearBatch</a> in class <a href="oracle.jdbc.driver.OracleStatement.html#_top_">OracleStatement</a>  </dl></dd></dl><a name="executeBatch()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="executeBatch"><b>executeBatch</b></a><pre> public synchronized int[] executeBatch() throws SQLException</pre><dl>  <dd> Submit a batch of parameters to the database for execution.<p>Commands are executed in the order in which they were added to thebatch.  This method closes the calling Statement object's currentset if one is open.  The statement's internal list of batchcommands is reset to empty once this method returns.<p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> an array containing one entry per each element inthe batch.  Each value is always -2.    <dt> <b>Throws:</b> BatchUpdateException    <dd> if any of the commands in the batch failed to executeproperly.  (For example, the batch will fail if itcontained a command that returns a result set.)    <dt> <b>Overrides:</b>    <dd> <a href="oracle.jdbc.driver.OracleStatement.html#executeBatch()">executeBatch</a> in class <a href="oracle.jdbc.driver.OracleStatement.html#_top_">OracleStatement</a>  </dl></dd></dl><hr><pre><a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-oracle.jdbc.driver.html">This Package</a>  <a href="oracle.jdbc.driver.OracleLog.html#_top_">Previous</a>  <a href="oracle.jdbc.driver.OracleResultSet.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre></body></html>

⌨️ 快捷键说明

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