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

📄 oracle.jdbc.driver.oraclepreparedstatement.html

📁 Oracle JDBC 的javaDoc
💻 HTML
📖 第 1 页 / 共 4 页
字号:
that the user might have set.  Binds that were performed before anysetXXXStream() is called, and that have not been executed, will beflushed (i.e. executed).<p>To use this API, the user must cast the PreparedStatement object to<code>oracle.jdbc.driver.OraclePreparedStatement</code>.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> batchValuebatch - value to be set.  It must be greater than orequal to 1.  </dl></dd></dl><a name="getExecuteBatch()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getExecuteBatch"><b>getExecuteBatch</b></a><pre> public final int getExecuteBatch()</pre><dl>  <dd> Retrieve the batch value (for Oracle-style batching only).<p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> the batch value last set by setExecuteBatch().  </dl></dd></dl><a name="defineParameterType(int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="defineParameterType"><b>defineParameterType</b></a><pre> public synchronized void defineParameterType(int param_index,                                              int type,                                              int max_size) throws SQLException</pre><dl>  <dd> Define the type under which you will bind the parameter  and the maximum size of data you will bind in binds.  <br><p>Similarly to  defineColumnType. Before executing a Query you may choose to inform JDBC of the type and maximum length of the bindparameter. If not, based on the setXXX call, the maximum length ofthe type is taken, i.e., for a setString a 4k buffer is allocated.This API does not reduce the network round trip. It is purely a memory optimization API. <P><B>Note:</B> You should use Types.CHAR as the type value if youare going bind later as setCHAR and use Types.VARCHAR if you are going to bind as setString for effective results.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> param_index - Index of bind parameter.    <dd> type - Type to be assigned to bind parameter.This type could be different from the native type of the column. Appropriate conversions will be done.    <dd> max_size - Maximum length of bind data in bytes.  </dl></dd></dl><a name="getMetaData()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getMetaData"><b>getMetaData</b></a><pre> public ResultSetMetaData getMetaData() throws SQLException</pre><dl>  <dd> JDBC 2.0Gets the number, types and properties of a ResultSet's columns.<p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> the description of a ResultSet's columns    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setNull(int, int, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setNull"><b>setNull</b></a><pre> public synchronized void setNull(int paramIndex,                                  int sqlType,                                  String sqlName) throws SQLException</pre><dl>  <dd> Implements JDBC 2.0 setNull for object types.Sets the designated parameter to SQL NULL.  This version of setNull shouldbe used for STRUCT, ARRAY and REF type parameters.<P><B>Note:</B> To be portable, applications must give theSQL type code and the fully-qualified SQL type name when specifyinga NULL user-defined or REF parameter.  In the case of a user-named 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.Although it is intended for user-named 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-named or REF type, the giventypeName is ignored.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> sqlType - a value from java.sql.Types    <dd> typeName - the fully-qualified name of an SQL user-named type,ignored if the parameter is not a user-named type or REF    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setNull(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setNull"><b>setNull</b></a><pre> public synchronized void setNull(int paramIndex,                                  int sqlType) throws SQLException</pre><dl>  <dd> Sets the designated parameter to SQL NULL. This method can't beused for STRUCT, REF and ARRAY type parameters.<P><B>Note:</B> You must specify the parameter's SQL type.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> parameterIndex - the first parameter is 1, the second is 2, ...    <dd> sqlType - the SQL type code defined in java.sql.Types    <dt> <b>Throws:</b> SQLException    <dd> if a database access error occurs  </dl></dd></dl><a name="setBoolean(int, boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setBoolean"><b>setBoolean</b></a><pre> public synchronized void setBoolean(int paramIndex,                                     boolean x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java boolean 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="setByte(int, byte)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setByte"><b>setByte</b></a><pre> public synchronized void setByte(int paramIndex,                                  byte x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java byte 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="setShort(int, short)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setShort"><b>setShort</b></a><pre> public synchronized void setShort(int paramIndex,                                   short x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java short 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="setInt(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setInt"><b>setInt</b></a><pre> public synchronized void setInt(int paramIndex,                                 int x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java int 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="setLong(int, long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setLong"><b>setLong</b></a><pre> public synchronized void setLong(int paramIndex,                                  long x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java long 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="setFloat(int, float)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setFloat"><b>setFloat</b></a><pre> public synchronized void setFloat(int paramIndex,                                   float x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java float 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="setDouble(int, double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setDouble"><b>setDouble</b></a><pre> public synchronized void setDouble(int paramIndex,                                    double x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java double 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="setBigDecimal(int, java.math.BigDecimal)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setBigDecimal"><b>setBigDecimal</b></a><pre> public synchronized void setBigDecimal(int paramIndex,                                        BigDecimal x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a java.lang.BigDecimal 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="setString(int, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setString"><b>setString</b></a><pre> public synchronized void setString(int paramIndex,                                    String x) throws SQLException</pre><dl>  <dd> Sets the designated parameter to a Java String 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="setFixedCHAR(int, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setFixedCHAR"><b>setFixedCHAR</b></a><pre> public synchronized void setFixedCHAR(int paramIndex,                                       String x) throws SQLException</pre><dl>  <dd> Use this method when binding to a CHAR column in the where clause of a Select statement. A non padded comparision willbe done unlike in setCHAR and setString case. Not particularlyneeded for an insert as the database will pad it. <p><p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> paramIndex - index of the bind variable    <dd> x - the literal/variable to be bound.  </dl></dd></dl><a name="setCursor(int, java.sql.ResultSet)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setCursor"><b>setCursor</b></a><pre> public synchronized void setCursor(int paramIndex,                                    ResultSet rs) throws SQLException</pre><dl>  <dd> Oracle specific.Sets the designated parameter to a java.sql.ResultSet. This is usedfor RefCursor parameter only.<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="setROWID(int, oracle.sql.ROWID)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setROWID"><b>setROWID</b></a><pre> public synchronized void setROWID(int paramIndex,                                   <a href="oracle.sql.ROWID.html#_top_">ROWID</a> rowid) throws SQLException</pre><dl>  <dd> Oracle specific.Sets the designated parameter to a oracle.sql.RAW.<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="setArray(int, oracle.jdbc2.Array)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setArray"><b>setArray</b></a><pre> public synchronized void setArray(int paramIndex,                                   Array arr) throws SQLException</pre><dl>  <dd> JDBC 2.0.Sets the designated parameter to a Array 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

⌨️ 快捷键说明

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