Oracle10g JDBC

oracle.jdbc.driver
Class OraclePreparedStatement

java.lang.Object
  extended byoracle.jdbc.driver.OracleStatement
      extended byoracle.jdbc.driver.OraclePreparedStatement
All Implemented Interfaces:
oracle.jdbc.internal.OraclePreparedStatement, OraclePreparedStatement, OracleStatement, oracle.jdbc.internal.OracleStatement, java.sql.PreparedStatement, oracle.jdbc.driver.ScrollRsetStatement, java.sql.Statement
Direct Known Subclasses:
OracleCallableStatement

public abstract class OraclePreparedStatement
extends OracleStatement
implements oracle.jdbc.internal.OraclePreparedStatement, oracle.jdbc.driver.ScrollRsetStatement

Oracle prepared statement class.


Field Summary
static java.lang.String BUILD_DATE
           
static boolean PRIVATE_TRACE
           
static boolean TRACE
           
static int TypeBinder_BYTELEN
           
 
Fields inherited from interface oracle.jdbc.OraclePreparedStatement
FORM_CHAR, FORM_NCHAR
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Fields inherited from interface oracle.jdbc.OracleStatement
EXPLICIT, IMPLICIT, NEW
 
Fields inherited from interface oracle.jdbc.internal.OracleStatement
ACTIVE, CACHED, CLOSED, DEFAULT_RSET_TYPE, NON_CACHED
 
Method Summary
 void addBatch()
          Add a set of parameters to the batch.
 void addBatch(java.lang.String sql)
          This method cannot be used in OraclePreparedStatement.
 void clearBatch()
          Make the set of parameters in the current batch empty.
 void clearParameters()
          In general, parameter values remain in force for repeated use of a Statement.
 void closeWithKey(java.lang.String key)
          The underlying cursor is not closed and the Statement handle is cached on the Key.
 void defineParameterType(int param_index, int type, int max_size)
          Define the type under which you will bind the parameter and the maximum size (in characters) of data you will bind in binds.
 void defineParameterTypeBytes(int param_index, int type, int max_size)
          Define the type under which you will bind the parameter and the maximum size (in bytes) of data you will bind in binds.
 void defineParameterTypeChars(int param_index, int type, int max_size)
          Define the type under which you will bind the parameter and the maximum size (in characters) of data you will bind in binds.
 void enterExplicitCache()
          enterExplicitCache This method is called by LRUStatementCache when this statement is about to be put into the explicit cache.
 boolean execute()
          Execute the statement.
 int[] executeBatch()
          Submit a batch of parameters to the database for execution.
 java.sql.ResultSet executeQuery()
          Execute the query statement.
 int executeUpdate()
          Execute the update statement.
 void exitExplicitCacheToActive()
          exitExplicitCacheToActive This method is called by LRUStatementCache when this statement is retrieved from the explicit cache, and is about to be reused.
 void exitExplicitCacheToClose()
          exitExplicitCacheToClose() This method is called by LRUStatementCache when this statement is about to be closed directly from the explicit cache.
 void exitImplicitCacheToActive()
          exitImplicitCacheToActive This method is called by LRUStatementCache when this statement is retrieved from the implicit cache, and is about to be reused.
 void exitImplicitCacheToClose()
          exitImplicitCacheToClose() This method is called by LRUStatementCache when this statement is about to be closed directly from the implicit cache.
 boolean getAutoRefetch()
          Oracle extension.
 java.sql.Connection getConnection()
          JDBC 2.0 Returns the Connection object that produced this Statement object.
 int getExecuteBatch()
          Retrieve the batch value (for Oracle-style batching only).
 int getMaxFieldSize()
           
 java.sql.ResultSetMetaData getMetaData()
          JDBC 2.0 Gets the number, types and properties of a ResultSet's columns.
 java.lang.String getOriginalSql()
           
 java.sql.ParameterMetaData getParameterMetaData()
           
 oracle.jdbc.driver.OracleResultSetCache getResultSetCache()
           
 java.lang.String getRevisedSql()
           
 void notify_close_rset()
           
 OracleParameterMetaData OracleGetParameterMetaData()
          Oracle extension Retrieves the number, types and properties of this oracle.jdbc.PreparedStatement object's parameters.
 int sendBatch()
          Send any existing Oracle-style batch.
 void setArray(int paramIndex, java.sql.Array arr)
          JDBC 2.0.
 void setARRAY(int paramIndex, ARRAY arr)
          Oracle specific.
 void setArrayAtName(java.lang.String paramName, java.sql.Array x)
          Sets the designated parameter to an Array value.
 void setARRAYAtName(java.lang.String paramName, ARRAY x)
          Sets the designated parameter to an oracle.sql.ARRAY
 void setAsciiStream(int paramIndex, java.io.InputStream istream, int length)
          Sets the designated parameter to the given input stream, which will have the specified number of bytes.
 void setAsciiStreamAtName(java.lang.String paramName, java.io.InputStream stream, int length)
          Sets the designated parameter to a the value read from a stream.
 void setAutoRefetch(boolean)
          Oracle extension.
 void setBfile(int paramIndex, BFILE file)
          Oracle specific.
 void setBFILE(int paramIndex, BFILE file)
          Oracle specific.
 void setBfileAtName(java.lang.String paramName, BFILE x)
          Sets the designated parameter to an oracle.sql.BFILE
 void setBFILEAtName(java.lang.String paramName, BFILE x)
          Sets the designated parameter to an oracle.sql.BFILE
 void setBigDecimal(int paramIndex, java.math.BigDecimal x)
          Sets the designated parameter to a java.math.BigDecimal value.
 void setBigDecimalAtName(java.lang.String paramName, java.math.BigDecimal x)
          Sets the designated parameter to a Java BigDecimal value.
 void setBinaryDouble(int paramIndex, BINARY_DOUBLE bd)
          Sets the designated parameter to an oracle.sql.BINARY_DOUBLE value.
 void setBinaryDouble(int paramIndex, double x)
          Sets the designated parameter to a Java double value.
 void setBinaryDoubleAtName(java.lang.String paramName, BINARY_DOUBLE x)
          Sets the designated parameter to a BINARY_DOUBLE value.
 void setBinaryDoubleAtName(java.lang.String paramName, double x)
          Sets the designated parameter to a Java double value.
 void setBinaryFloat(int paramIndex, BINARY_FLOAT bf)
          Sets the designated parameter to an oracle.sql.BINARY_FLOAT value.
 void setBinaryFloat(int paramIndex, float x)
          Sets the designated BINARY_FLOAT parameter to a Java float value.
 void setBinaryFloatAtName(java.lang.String paramName, BINARY_FLOAT x)
          Sets the designated parameter to a oracle.sql.BINARY_FLOAT value.
 void setBinaryFloatAtName(java.lang.String paramName, float x)
          Sets the designated parameter to a Java float value.
 void setBinaryStream(int paramIndex, java.io.InputStream istream, int length)
          Sets the designated parameter to the given input stream, which will have the specified number of bytes.
 void setBinaryStreamAtName(java.lang.String paramName, java.io.InputStream stream, int length)
          Sets the designated parameter to the value in a stream.
 void setBlob(int paramIndex, java.sql.Blob lob)
          JDBC 2.0.
 void setBLOB(int paramIndex, BLOB lob)
          Oracle specific.
 void setBlobAtName(java.lang.String paramName, java.sql.Blob x)
          Sets the designated parameter to a Java Blob value.
 void setBLOBAtName(java.lang.String paramName, BLOB x)
          Sets the designated parameter to an oracle.sql.BLOB.
 void setBoolean(int paramIndex, boolean x)
          Sets the designated parameter to a Java boolean value.
 void setBooleanAtName(java.lang.String paramName, boolean x)
          Sets the designated parameter to a Java boolean value.
 void setByte(int paramIndex, byte x)
          Sets the designated parameter to a Java byte value.
 void setByteAtName(java.lang.String paramName, byte x)
          Sets the designated parameter to a Java byte value.
 void setBytes(int paramIndex, byte[] x)
          Sets the designated parameter to a Java array of bytes.
 void setBytesAtName(java.lang.String paramName, byte[] x)
          Sets the designated parameter to a Java array of bytes.
 void setCHAR(int paramIndex, CHAR ch)
          Oracle specific.
 void setCharacterStream(int paramIndex, java.io.Reader reader, int length)
          JDBC 2.0 Sets the designated parameter to the given Reader object, which is the given number of characters long.
 void setCHARAtName(java.lang.String paramName, CHAR x)
          Sets the designated parameter to an oracle.sql.CHAR
 void setClob(int paramIndex, java.sql.Clob lob)
          JDBC 2.0.
 void setCLOB(int paramIndex, CLOB lob)
          Oracle specific.
 void setClobAtName(java.lang.String paramName, java.sql.Clob x)
          Sets the designated parameter to a Java Clob value.
 void setCLOBAtName(java.lang.String paramName, CLOB x)
          Sets the designated parameter to an oracle.sql.CLOB.
 void setCursorAtName(java.lang.String paramName, java.sql.ResultSet x)
          Sets the designated parameter to a java.sql.ResultSet.
 void setCustomDatum(int paramIndex, CustomDatum x)
          Deprecated.  
 void setCustomDatumAtName(java.lang.String paramName, CustomDatum x)
          Sets the designated parameter to an oracle.sql.CustomDatum.
 void setDate(int paramIndex, java.sql.Date x)
          Sets the designated parameter to a java.sql.Date value.
 void setDATE(int paramIndex, DATE date)
          Oracle specific.
 void setDate(int paramIndex, java.sql.Date x, java.util.Calendar cal)
          JDBC 2.0 Sets the designated parameter to a java.sql.Date value, using the given Calendar object.
 void setDateAtName(java.lang.String paramName, java.sql.Date x)
          Sets the designated parameter to a Java Date value.
 void setDATEAtName(java.lang.String paramName, DATE x)
          Sets the designated parameter to an oracle.sql.DATE.
 void setDisableStmtCaching(boolean cache)
          Don't Cache this object even when the corresponding Connection is Cache Enabled.
 void setDouble(int paramIndex, double x)
          Sets the designated parameter to a Java double value.
 void setDoubleAtName(java.lang.String paramName, double x)
          Sets the designated parameter to a Java double value.
 void setEscapeProcessing(boolean enable)
           
 void setExecuteBatch(int batchValue)
          Set the batch value (for Oracle-style batching only).
 void setFixedCHAR(int paramIndex, java.lang.String x)
          Use this method when binding to a CHAR column in the where clause of a Select statement.
 void setFixedCHARAtName(java.lang.String paramName, java.lang.String x)
          Sets the designated parameter to a fixed length CHAR value.
 void setFloat(int paramIndex, float x)
          Sets the designated parameter to a Java float value.
 void setFloatAtName(java.lang.String paramName, float x)
          Sets the designated parameter to a Java float value.
 void setFormOfUse(int paramIndex, short formOfUse)
          Sets the "Form Of Use".
 void setInt(int paramIndex, int x)
          Sets the designated parameter to a Java int value.
 void setIntAtName(java.lang.String paramName, int x)
          Sets the designated parameter to a Java int value.
 void setINTERVALDS(int paramIndex, INTERVALDS x)
          Sets the designated parameter to an oracle.sql.INTERVALDS value.
 void setINTERVALDSAtName(java.lang.String paramName, INTERVALDS x)
          Sets the designated parameter to a oracle.sql.INTERVALDS.
 void setINTERVALYM(int paramIndex, INTERVALYM x)
          Sets the designated parameter to an oracle.sql.INTERVALYM value.
 void setINTERVALYMAtName(java.lang.String paramName, INTERVALYM x)
          Sets the designated parameter to an oracle.sql.INTERVALYM.
 void setLong(int paramIndex, long x)
          Sets the designated parameter to a Java long value.
 void setLongAtName(java.lang.String paramName, long x)
          Sets the designated parameter to a Java long value.
 void setNull(int paramIndex, int sqlType)
          Sets the designated parameter to SQL NULL.
 void setNull(int paramIndex, int sqlType, java.lang.String sqlName)
          Implements JDBC 2.0 setNull for object types.
 void setNullAtName(java.lang.String paramName, int sqlType)
          Sets the designated parameter to NULL.
 void setNullAtName(java.lang.String paramName, int sqlType, java.lang.String sqlName)
          Sets the designated parameter to Null
 void setNUMBER(int paramIndex, NUMBER num)
          Oracle specific.
 void setNUMBERAtName(java.lang.String paramName, NUMBER x)
          Sets the designated parameter to an oracle.sql.NUMBER.
 void setObject(int paramIndex, java.lang.Object x)
          Sets the value of the designated parameter with the given object.
 void setObject(int paramIndex, java.lang.Object x, int targetSqlType)
          Sets the value of the designated parameter with the given object.
 void setObject(int paramIndex, java.lang.Object x, int targetSqlType, int scale)
          Sets the value of a parameter using an object.
 void setObjectAtName(java.lang.String paramName, java.lang.Object x)
          Sets the designated parameter to a Java Object.
 void setObjectAtName(java.lang.String paramName, java.lang.Object x, int targetSqlType)
          Sets the designated parameter to a Java Object.
 void setObjectAtName(java.lang.String paramName, java.lang.Object x, int targetSqlType, int scale)
          Sets the designated parameter to a Java Object
 void setOPAQUE(int paramIndex, OPAQUE opaque)
          Oracle specific.
 void setOPAQUEAtName(java.lang.String paramName, OPAQUE x)
          Sets the designated parameter to an oracle.sql.OPAQUE.
 void setOracleObject(int paramIndex, Datum x)
          Oracle specific.
 void setOracleObjectAtName(java.lang.String paramName, Datum x)
          Sets the designated parameter to an oracle.sql.Datum.
 void setORAData(int paramIndex, ORAData x)
          Set the designated parameter to an oracle.sql.ORAData value.
 void setORADataAtName(java.lang.String paramName, ORAData x)
          Sets the designated parameter to an oracle.sql.ORAData.
 void setPlsqlIndexTable(int paramIndex, java.lang.Object arrayData, int maxLen, int curLen, int elemSqlType, int elemMaxLen)
          Oracle OCI driver specific.
 void setPlsqlIndexTableAtName(java.lang.String paramName, java.lang.Object arrayData, int maxLen, int curLen, int elemSqlType, int elemMaxLen)
          Sets the designated parameter to a Java int value.
 void setRAW(int paramIndex, RAW raw)
          Oracle specific.
 void setRAWAtName(java.lang.String paramName, RAW x)
          Sets the designated parameter to an oracle.sql.RAW.
 void setRef(int paramIndex, java.sql.Ref ref)
          JDBC 2.0 Sets a Ref(<structured-type>) parameter.
 void setREF(int paramIndex, REF ref)
          Oracle specific.
 void setRefAtName(java.lang.String paramName, java.sql.Ref x)
          Sets the designated parameter to a Ref.
 void setREFAtName(java.lang.String paramName, REF x)
          Sets the designated parameter to an oracle.sql.REF.
 void setRefType(int paramIndex, REF ref)
          Oracle specific.
 void setRefTypeAtName(java.lang.String paramName, REF x)
          Sets the designated parameter to an oracle.sql.REF value.
 void setROWID(int paramIndex, ROWID rowid)
          Oracle specific.
 void setROWIDAtName(java.lang.String paramName, ROWID x)
          Sets the designated parameter to a oracle.sql.ROWID.
 void setShort(int paramIndex, short x)
          Sets the designated parameter to a Java short value.
 void setShortAtName(java.lang.String paramName, short x)
          Sets the designated parameter to a Java short value.
 void setString(int paramIndex, java.lang.String x)
          Sets the designated parameter to a Java String value.
 void setStringAtName(java.lang.String paramName, java.lang.String x)
          Sets the designated parameter to a Java String value.
 void setStringForClob(int paramIndex, java.lang.String x)
          Sets the designated parameter to a Java String value.
 void setStringForClobAtName(java.lang.String paramName, java.lang.String x)
          Sets the designated parameter to a Java String value.
 void setSTRUCT(int paramIndex, STRUCT struct)
          Oracle specific.
 void setSTRUCTAtName(java.lang.String paramName, STRUCT x)
          Sets the designated parameter to an oracle.sql.STRUCT.
 void setStructDescriptor(int paramIndex, StructDescriptor desc)
          Oracle specific.
 void setStructDescriptorAtName(java.lang.String paramName, StructDescriptor desc)
          Sets the bind type of the designated parameter from an oracle.sql.StructDescriptor.
 void setTime(int paramIndex, java.sql.Time x)
          Sets the designated parameter to a java.sql.Time value.
 void setTime(int paramIndex, java.sql.Time x, java.util.Calendar cal)
          JDBC 2.0 Sets the designated parameter to a java.sql.Time value, using the given Calendar object.
 void setTimeAtName(java.lang.String paramName, java.sql.Time x)
          Sets the designated parameter to a Java Time value.
 void setTimestamp(int paramIndex, java.sql.Timestamp x)
          Sets the designated parameter to a java.sql.Timestamp value.
 void setTIMESTAMP(int paramIndex, TIMESTAMP x)
          Sets the designated parameter to an oracle.sql.TIMESTAMP value.
 void setTimestamp(int paramIndex, java.sql.Timestamp x, java.util.Calendar cal)
          JDBC 2.0 Sets the designated parameter to a java.sql.Timestamp value, using the given Calendar object.
 void setTimestampAtName(java.lang.String paramName, java.sql.Timestamp x)
          Sets the designated parameter to a Java Timestamp value.
 void setTIMESTAMPAtName(java.lang.String paramName, TIMESTAMP x)
          Sets the designated parameter to an oracle.sql.TIMESTAMP
 void setTIMESTAMPLTZ(int paramIndex, TIMESTAMPLTZ x)
          Sets the designated parameter to an oracle.sql.TIMESTAMPLTZ value.
 void setTIMESTAMPLTZAtName(java.lang.String paramName, TIMESTAMPLTZ x)
          Sets the designated parameter to an oracle.sql.TIMESTAMPLTZ.
 void setTIMESTAMPTZ(int paramIndex, TIMESTAMPTZ x)
          Sets the designated parameter to an oracle.sql.TIMESTAMPTZ value.
 void setTIMESTAMPTZAtName(java.lang.String paramName, TIMESTAMPTZ x)
          Sets the designated parameter to an oracle.sql.TIMESTAMPTZ.
 void setUnicodeStream(int paramIndex, java.io.InputStream istream, int length)
          Deprecated.  
 void setUnicodeStreamAtName(java.lang.String paramName, java.io.InputStream stream, int length)
          Sets the designated parameter to the value in a stream.
 void setURL(int paramIndex, java.net.URL x)
          JDBC 3.0 Sets the designated parameter to the given java.net.URL value.
 void setURLAtName(java.lang.String paramName, java.net.URL x)
          Oracle extension Sets the designated parameter to a java.net.URL value.
 
Methods inherited from class oracle.jdbc.driver.OracleStatement
cancel, clearDefines, clearWarnings, close, defineColumnType, defineColumnType, defineColumnType, defineColumnType, defineColumnTypeBytes, defineColumnTypeChars, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getcacheState, getFetchDirection, getFetchSize, getFixedString, getGeneratedKeys, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getRowPrefetch, getserverCursor, getstatementType, getUpdateCount, getWarnings, isNCHAR, setCursorName, setFetchDirection, setFetchSize, setFixedString, setMaxFieldSize, setMaxRows, setQueryTimeout, setResultSetCache, setResultSetCache, setRowPrefetch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Statement
cancel, clearWarnings, close, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 
Methods inherited from interface oracle.jdbc.OracleStatement
clearDefines, creationState, defineColumnType, defineColumnType, defineColumnType, defineColumnType, defineColumnTypeBytes, defineColumnTypeChars, getRowPrefetch, isNCHAR, setResultSetCache, setRowPrefetch
 
Methods inherited from interface oracle.jdbc.internal.OracleStatement
getcacheState, getFixedString, getserverCursor, getstatementType, setFixedString
 

Field Detail

TypeBinder_BYTELEN

public static final int TypeBinder_BYTELEN
See Also:
Constant Field Values

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

PRIVATE_TRACE

public static final boolean PRIVATE_TRACE
See Also:
Constant Field Values

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values
Method Detail

enterExplicitCache

public void enterExplicitCache()
                        throws java.sql.SQLException
enterExplicitCache This method is called by LRUStatementCache when this statement is about to be put into the explicit cache.

Specified by:
enterExplicitCache in interface oracle.jdbc.internal.OraclePreparedStatement
Throws:
java.sql.SQLException

exitImplicitCacheToActive

public void exitImplicitCacheToActive()
                               throws java.sql.SQLException
exitImplicitCacheToActive This method is called by LRUStatementCache when this statement is retrieved from the implicit cache, and is about to be reused.

Specified by:
exitImplicitCacheToActive in interface oracle.jdbc.internal.OraclePreparedStatement
Throws:
java.sql.SQLException

exitExplicitCacheToActive

public void exitExplicitCacheToActive()
                               throws java.sql.SQLException
exitExplicitCacheToActive This method is called by LRUStatementCache when this statement is retrieved from the explicit cache, and is about to be reused.

Specified by:
exitExplicitCacheToActive in interface oracle.jdbc.internal.OraclePreparedStatement
Throws:
java.sql.SQLException

exitImplicitCacheToClose

public void exitImplicitCacheToClose()
                              throws java.sql.SQLException
exitImplicitCacheToClose() This method is called by LRUStatementCache when this statement is about to be closed directly from the implicit cache.

Specified by:
exitImplicitCacheToClose in interface oracle.jdbc.internal.OraclePreparedStatement
Throws:
java.sql.SQLException

exitExplicitCacheToClose

public void exitExplicitCacheToClose()
                              throws java.sql.SQLException
exitExplicitCacheToClose() This method is called by LRUStatementCache when this statement is about to be closed directly from the explicit cache.

Specified by:
exitExplicitCacheToClose in interface oracle.jdbc.internal.OraclePreparedStatement
Throws:
java.sql.SQLException

closeWithKey

public void closeWithKey(java.lang.String key)
                  throws java.sql.SQLException
The underlying cursor is not closed and the Statement handle is cached on the Key. The Statement is cached as it is and the state, data, and meta-data is not cleared. The same statement can be retrieved with this Key later.

Specified by:
closeWithKey in interface OracleStatement
Overrides:
closeWithKey in class OracleStatement
Parameters:
key - A key to tag to the statement to be retrieved later
Throws:
java.sql.SQLException - if a database access error occurs

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Execute the query statement.

Specified by:
executeQuery in interface java.sql.PreparedStatement
Returns:
the query result set.
Throws:
java.sql.SQLException - if error(s) occurred.

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Execute the update statement.

Specified by:
executeUpdate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if error(s) occurred.

execute

public boolean execute()
                throws java.sql.SQLException
Execute the statement.

Specified by:
execute in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if error(s) occurred.

sendBatch

public int sendBatch()
              throws java.sql.SQLException
Send any existing Oracle-style batch.

This API is used in the context of Oracle-style batching. It flushes any batched executions before the batch value is reached. Executions normally happen when the number of executions reaches the batch value, which is set via the API setExecuteBatch(). It does not do anything if the statement does not use Oracle-style batching.

To use this API, the user must cast the PreparedStatement object to OraclePreparedStatement.

Specified by:
sendBatch in interface OraclePreparedStatement
Overrides:
sendBatch in class OracleStatement
Returns:
the update count.
Throws:
java.sql.SQLException - if an error occurred.

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws java.sql.SQLException
Specified by:
setEscapeProcessing in interface java.sql.Statement
Overrides:
setEscapeProcessing in class OracleStatement
Throws:
java.sql.SQLException

setExecuteBatch

public void setExecuteBatch(int batchValue)
                     throws java.sql.SQLException
Set the batch value (for Oracle-style batching only).

The Oracle Jdbc driver can "batch" multiple executions of a single statement with different bind variables. Actual execution happens when the number of batched executions reaches the "batch value", which is set by this API.

The batch value for this prepared statement can be set at any time via this API. Changing the batch value will affect all future executes.

The batch value will automatically be set to 1 by the driver if any of the bind types is of type stream. This overrides any value that the user might have set. Binds that were performed before any setXXXStream() is called, and that have not been executed, will be flushed (i.e. executed).

To use this API, the user must cast the PreparedStatement object to OraclePreparedStatement.

Specified by:
setExecuteBatch in interface OraclePreparedStatement
Parameters:
batchValue - batch value to be set. It must be greater than or equal to 1.
Throws:
java.sql.SQLException - is batchValue is <1
See Also:
getExecuteBatch, OracleConnection.setDefaultExecuteBatch

getExecuteBatch

public final int getExecuteBatch()
Retrieve the batch value (for Oracle-style batching only).

Specified by:
getExecuteBatch in interface OraclePreparedStatement
Returns:
the batch value last set by setExecuteBatch().
See Also:
OracleConnection.setDefaultExecuteBatch, setExecuteBatch

defineParameterTypeBytes

public void defineParameterTypeBytes(int param_index,
                                     int type,
                                     int max_size)
                              throws java.sql.SQLException
Define the type under which you will bind the parameter and the maximum size (in bytes) of data you will bind in binds.

Similar to defineColumnType, before executing a Query you may choose to inform JDBC of the type and maximum length of the bind parameter. If not, based on the setXXX call, the maximum length of the 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.

Note: You should use Types.CHAR as the type value if you are going bind later as setCHAR and use Types.VARCHAR if you are going to bind as setString for effective results. Also, you cannot use this for LONG types.

Specified by:
defineParameterTypeBytes in interface OraclePreparedStatement
Parameters:
param_index - Index of bind parameter.
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.
max_size - Maximum length of bind data in bytes.
Throws:
java.sql.SQLException - if the type you specify is not available

defineParameterTypeChars

public void defineParameterTypeChars(int param_index,
                                     int type,
                                     int max_size)
                              throws java.sql.SQLException
Define the type under which you will bind the parameter and the maximum size (in characters) of data you will bind in binds.

Similarly to defineColumnType(). Before executing a Query you may choose to inform JDBC of the type and maximum length of the bind parameter. If not, based on the setXXX call, the maximum length of the 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.

Note: You should use OracleTypes.CHAR as the type value if you are going bind later as setCHAR and use OracleTypes.VARCHAR if you are going to bind as setString for effective results.

Specified by:
defineParameterTypeChars in interface OraclePreparedStatement
Parameters:
param_index - Index of bind parameter (should be >=0)
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.
max_size - Maximum length of bind data in bytes (should be >=0)
Throws:
java.sql.SQLException - if the type you specify is not available

defineParameterType

public void defineParameterType(int param_index,
                                int type,
                                int max_size)
                         throws java.sql.SQLException
Define the type under which you will bind the parameter and the maximum size (in characters) of data you will bind in binds. Depending on the value of the dataSizeUnits connection property, max_size will be measured in bytes or characters.

Specified by:
defineParameterType in interface OraclePreparedStatement
Throws:
java.sql.SQLException

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
JDBC 2.0 Gets the number, types and properties of a ResultSet's columns.

Specified by:
getMetaData in interface java.sql.PreparedStatement
Returns:
the description of a ResultSet's columns
Throws:
java.sql.SQLException - if a database access error occurs

setNull

public void setNull(int paramIndex,
                    int sqlType,
                    java.lang.String sqlName)
             throws java.sql.SQLException
Implements JDBC 2.0 setNull for object types. Sets the designated parameter to SQL NULL. This version of setNull should be used for STRUCT, ARRAY and REF type parameters.

Note: 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-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 given typeName is ignored.

Specified by:
setNull in interface java.sql.PreparedStatement
Parameters:
sqlType - a value from java.sql.Types
Throws:
java.sql.SQLException - if a database access error occurs

setNullAtName

public void setNullAtName(java.lang.String paramName,
                          int sqlType,
                          java.lang.String sqlName)
                   throws java.sql.SQLException
Sets the designated parameter to Null

Specified by:
setNullAtName in interface OraclePreparedStatement
Parameters:
sqlType -
sqlName -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setNull

public void setNull(int paramIndex,
                    int sqlType)
             throws java.sql.SQLException
Sets the designated parameter to SQL NULL. This method can't be used for STRUCT, REF and ARRAY type parameters.

Note: You must specify the parameter's SQL type.

Specified by:
setNull in interface java.sql.PreparedStatement
Parameters:
sqlType - the SQL type code defined in java.sql.Types
Throws:
java.sql.SQLException - if a database access error occurs

setNullAtName

public void setNullAtName(java.lang.String paramName,
                          int sqlType)
                   throws java.sql.SQLException
Sets the designated parameter to NULL.

Specified by:
setNullAtName in interface OraclePreparedStatement
Parameters:
sqlType -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBoolean

public void setBoolean(int paramIndex,
                       boolean x)
                throws java.sql.SQLException
Sets the designated parameter to a Java boolean value.

Specified by:
setBoolean in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBooleanAtName

public void setBooleanAtName(java.lang.String paramName,
                             boolean x)
                      throws java.sql.SQLException
Sets the designated parameter to a Java boolean value.

Specified by:
setBooleanAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setByte

public void setByte(int paramIndex,
                    byte x)
             throws java.sql.SQLException
Sets the designated parameter to a Java byte value.

Specified by:
setByte in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setByteAtName

public void setByteAtName(java.lang.String paramName,
                          byte x)
                   throws java.sql.SQLException
Sets the designated parameter to a Java byte value.

Specified by:
setByteAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setShort

public void setShort(int paramIndex,
                     short x)
              throws java.sql.SQLException
Sets the designated parameter to a Java short value.

Specified by:
setShort in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setShortAtName

public void setShortAtName(java.lang.String paramName,
                           short x)
                    throws java.sql.SQLException
Sets the designated parameter to a Java short value.

Specified by:
setShortAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setInt

public void setInt(int paramIndex,
                   int x)
            throws java.sql.SQLException
Sets the designated parameter to a Java int value.

Specified by:
setInt in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setIntAtName

public void setIntAtName(java.lang.String paramName,
                         int x)
                  throws java.sql.SQLException
Sets the designated parameter to a Java int value.

Specified by:
setIntAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setLong

public void setLong(int paramIndex,
                    long x)
             throws java.sql.SQLException
Sets the designated parameter to a Java long value.

Specified by:
setLong in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setLongAtName

public void setLongAtName(java.lang.String paramName,
                          long x)
                   throws java.sql.SQLException
Sets the designated parameter to a Java long value.

Specified by:
setLongAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setFloat

public void setFloat(int paramIndex,
                     float x)
              throws java.sql.SQLException
Sets the designated parameter to a Java float value.

Specified by:
setFloat in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryFloat

public void setBinaryFloat(int paramIndex,
                           float x)
                    throws java.sql.SQLException
Sets the designated BINARY_FLOAT parameter to a Java float value.

Specified by:
setBinaryFloat in interface OraclePreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryFloatAtName

public void setBinaryFloatAtName(java.lang.String paramName,
                                 float x)
                          throws java.sql.SQLException
Sets the designated parameter to a Java float value.

Specified by:
setBinaryFloatAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryFloat

public void setBinaryFloat(int paramIndex,
                           BINARY_FLOAT bf)
                    throws java.sql.SQLException
Description copied from interface: OraclePreparedStatement
Sets the designated parameter to an oracle.sql.BINARY_FLOAT value.

Specified by:
setBinaryFloat in interface OraclePreparedStatement
Parameters:
bf - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryFloatAtName

public void setBinaryFloatAtName(java.lang.String paramName,
                                 BINARY_FLOAT x)
                          throws java.sql.SQLException
Sets the designated parameter to a oracle.sql.BINARY_FLOAT value.

Specified by:
setBinaryFloatAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryDouble

public void setBinaryDouble(int paramIndex,
                            double x)
                     throws java.sql.SQLException
Sets the designated parameter to a Java double value.

Specified by:
setBinaryDouble in interface OraclePreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryDouble

public void setBinaryDouble(int paramIndex,
                            BINARY_DOUBLE bd)
                     throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.BINARY_DOUBLE value.

Specified by:
setBinaryDouble in interface OraclePreparedStatement
Parameters:
bd - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryDoubleAtName

public void setBinaryDoubleAtName(java.lang.String paramName,
                                  double x)
                           throws java.sql.SQLException
Sets the designated parameter to a Java double value.

Specified by:
setBinaryDoubleAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setFloatAtName

public void setFloatAtName(java.lang.String paramName,
                           float x)
                    throws java.sql.SQLException
Sets the designated parameter to a Java float value.

Specified by:
setFloatAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryDoubleAtName

public void setBinaryDoubleAtName(java.lang.String paramName,
                                  BINARY_DOUBLE x)
                           throws java.sql.SQLException
Sets the designated parameter to a BINARY_DOUBLE value.

Specified by:
setBinaryDoubleAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setDouble

public void setDouble(int paramIndex,
                      double x)
               throws java.sql.SQLException
Sets the designated parameter to a Java double value.

Specified by:
setDouble in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setDoubleAtName

public void setDoubleAtName(java.lang.String paramName,
                            double x)
                     throws java.sql.SQLException
Sets the designated parameter to a Java double value.

Specified by:
setDoubleAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBigDecimal

public void setBigDecimal(int paramIndex,
                          java.math.BigDecimal x)
                   throws java.sql.SQLException
Sets the designated parameter to a java.math.BigDecimal value.

Specified by:
setBigDecimal in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBigDecimalAtName

public void setBigDecimalAtName(java.lang.String paramName,
                                java.math.BigDecimal x)
                         throws java.sql.SQLException
Sets the designated parameter to a Java BigDecimal value.

Specified by:
setBigDecimalAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setString

public void setString(int paramIndex,
                      java.lang.String x)
               throws java.sql.SQLException
Sets the designated parameter to a Java String value.

Specified by:
setString in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setStringAtName

public void setStringAtName(java.lang.String paramName,
                            java.lang.String x)
                     throws java.sql.SQLException
Sets the designated parameter to a Java String value.

Specified by:
setStringAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setStringForClob

public void setStringForClob(int paramIndex,
                             java.lang.String x)
                      throws java.sql.SQLException
Sets the designated parameter to a Java String value.

Specified by:
setStringForClob in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramIndex -
Throws:
java.sql.SQLException - if a database access error occurs

setStringForClobAtName

public void setStringForClobAtName(java.lang.String paramName,
                                   java.lang.String x)
                            throws java.sql.SQLException
Sets the designated parameter to a Java String value.

Specified by:
setStringForClobAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setFixedCHAR

public void setFixedCHAR(int paramIndex,
                         java.lang.String x)
                  throws java.sql.SQLException
Use this method when binding to a CHAR column in the where clause of a Select statement. A non padded comparison will be done unlike in setCHAR and setString case. Not particularly needed for an insert as the database will pad it.

Specified by:
setFixedCHAR in interface OraclePreparedStatement
Parameters:
paramIndex - index of the bind variable
x - the literal/variable to be bound.
Throws:
java.sql.SQLException - error while binding
See Also:
setCHAR

setFixedCHARAtName

public void setFixedCHARAtName(java.lang.String paramName,
                               java.lang.String x)
                        throws java.sql.SQLException
Sets the designated parameter to a fixed length CHAR value.

Specified by:
setFixedCHARAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setCursorAtName

public void setCursorAtName(java.lang.String paramName,
                            java.sql.ResultSet x)
                     throws java.sql.SQLException
Sets the designated parameter to a java.sql.ResultSet.

Specified by:
setCursorAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setROWID

public void setROWID(int paramIndex,
                     ROWID rowid)
              throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.ROWID.

Specified by:
setROWID in interface OraclePreparedStatement
Parameters:
rowid - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setROWIDAtName

public void setROWIDAtName(java.lang.String paramName,
                           ROWID x)
                    throws java.sql.SQLException
Sets the designated parameter to a oracle.sql.ROWID.

Specified by:
setROWIDAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setArray

public void setArray(int paramIndex,
                     java.sql.Array arr)
              throws java.sql.SQLException
JDBC 2.0. Sets the designated parameter to a Array value.

Specified by:
setArray in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if a database access error occurs

setArrayAtName

public void setArrayAtName(java.lang.String paramName,
                           java.sql.Array x)
                    throws java.sql.SQLException
Sets the designated parameter to an Array value.

Specified by:
setArrayAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setARRAY

public void setARRAY(int paramIndex,
                     ARRAY arr)
              throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.ARRAY.

Specified by:
setARRAY in interface OraclePreparedStatement
Parameters:
arr - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setARRAYAtName

public void setARRAYAtName(java.lang.String paramName,
                           ARRAY x)
                    throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.ARRAY

Specified by:
setARRAYAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setOPAQUE

public void setOPAQUE(int paramIndex,
                      OPAQUE opaque)
               throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.OPAQUE.

Specified by:
setOPAQUE in interface OraclePreparedStatement
Parameters:
opaque - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setOPAQUEAtName

public void setOPAQUEAtName(java.lang.String paramName,
                            OPAQUE x)
                     throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.OPAQUE.

Specified by:
setOPAQUEAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setStructDescriptor

public void setStructDescriptor(int paramIndex,
                                StructDescriptor desc)
                         throws java.sql.SQLException
Oracle specific. Sets the bind type of designated parameter from an StructDescriptor.

Specified by:
setStructDescriptor in interface OraclePreparedStatement
Throws:
java.sql.SQLException - if a database access error occurs

setStructDescriptorAtName

public void setStructDescriptorAtName(java.lang.String paramName,
                                      StructDescriptor desc)
                               throws java.sql.SQLException
Sets the bind type of the designated parameter from an oracle.sql.StructDescriptor.

Specified by:
setStructDescriptorAtName in interface OraclePreparedStatement
Parameters:
desc - the StructDescriptor
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setSTRUCT

public void setSTRUCT(int paramIndex,
                      STRUCT struct)
               throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.STRUCT.

Specified by:
setSTRUCT in interface OraclePreparedStatement
Parameters:
struct - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setSTRUCTAtName

public void setSTRUCTAtName(java.lang.String paramName,
                            STRUCT x)
                     throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.STRUCT.

Specified by:
setSTRUCTAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setRAW

public void setRAW(int paramIndex,
                   RAW raw)
            throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.RAW.

Specified by:
setRAW in interface OraclePreparedStatement
Parameters:
raw - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setRAWAtName

public void setRAWAtName(java.lang.String paramName,
                         RAW x)
                  throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.RAW.

Specified by:
setRAWAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setCHAR

public void setCHAR(int paramIndex,
                    CHAR ch)
             throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.CHAR.

Specified by:
setCHAR in interface OraclePreparedStatement
Parameters:
ch - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
setFixedChar

setCHARAtName

public void setCHARAtName(java.lang.String paramName,
                          CHAR x)
                   throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.CHAR

Specified by:
setCHARAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setDATE

public void setDATE(int paramIndex,
                    DATE date)
             throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.DATE.

Specified by:
setDATE in interface OraclePreparedStatement
Parameters:
date - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setDATEAtName

public void setDATEAtName(java.lang.String paramName,
                          DATE x)
                   throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.DATE.

Specified by:
setDATEAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setNUMBER

public void setNUMBER(int paramIndex,
                      NUMBER num)
               throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.NUMBER.

Specified by:
setNUMBER in interface OraclePreparedStatement
Parameters:
num - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setNUMBERAtName

public void setNUMBERAtName(java.lang.String paramName,
                            NUMBER x)
                     throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.NUMBER.

Specified by:
setNUMBERAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBLOB

public void setBLOB(int paramIndex,
                    BLOB lob)
             throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.BLOB.

Specified by:
setBLOB in interface OraclePreparedStatement
Parameters:
lob - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBLOBAtName

public void setBLOBAtName(java.lang.String paramName,
                          BLOB x)
                   throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.BLOB.

Specified by:
setBLOBAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBlob

public void setBlob(int paramIndex,
                    java.sql.Blob lob)
             throws java.sql.SQLException
JDBC 2.0. Sets the designated parameter to a Blob value.

Specified by:
setBlob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if a database access error occurs

setBlobAtName

public void setBlobAtName(java.lang.String paramName,
                          java.sql.Blob x)
                   throws java.sql.SQLException
Sets the designated parameter to a Java Blob value.

Specified by:
setBlobAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setCLOB

public void setCLOB(int paramIndex,
                    CLOB lob)
             throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.CLOB.

Specified by:
setCLOB in interface OraclePreparedStatement
Parameters:
lob - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setCLOBAtName

public void setCLOBAtName(java.lang.String paramName,
                          CLOB x)
                   throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.CLOB.

Specified by:
setCLOBAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setClob

public void setClob(int paramIndex,
                    java.sql.Clob lob)
             throws java.sql.SQLException
JDBC 2.0. Sets the designated parameter to a Clob value.

Specified by:
setClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if a database access error occurs

setClobAtName

public void setClobAtName(java.lang.String paramName,
                          java.sql.Clob x)
                   throws java.sql.SQLException
Sets the designated parameter to a Java Clob value.

Specified by:
setClobAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBFILE

public void setBFILE(int paramIndex,
                     BFILE file)
              throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.BFILE value.

Specified by:
setBFILE in interface OraclePreparedStatement
Parameters:
file - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBFILEAtName

public void setBFILEAtName(java.lang.String paramName,
                           BFILE x)
                    throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.BFILE

Specified by:
setBFILEAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBfile

public void setBfile(int paramIndex,
                     BFILE file)
              throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.BFILE value.

Specified by:
setBfile in interface OraclePreparedStatement
Parameters:
file - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
setBFILE

setBfileAtName

public void setBfileAtName(java.lang.String paramName,
                           BFILE x)
                    throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.BFILE

Specified by:
setBfileAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBytes

public void setBytes(int paramIndex,
                     byte[] x)
              throws java.sql.SQLException
Sets the designated parameter to a Java array of bytes.

Specified by:
setBytes in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBytesAtName

public void setBytesAtName(java.lang.String paramName,
                           byte[] x)
                    throws java.sql.SQLException
Sets the designated parameter to a Java array of bytes.

Specified by:
setBytesAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setDate

public void setDate(int paramIndex,
                    java.sql.Date x)
             throws java.sql.SQLException
Sets the designated parameter to a java.sql.Date value.

Specified by:
setDate in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setDateAtName

public void setDateAtName(java.lang.String paramName,
                          java.sql.Date x)
                   throws java.sql.SQLException
Sets the designated parameter to a Java Date value.

Specified by:
setDateAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setTime

public void setTime(int paramIndex,
                    java.sql.Time x)
             throws java.sql.SQLException
Sets the designated parameter to a java.sql.Time value.

Specified by:
setTime in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setTimeAtName

public void setTimeAtName(java.lang.String paramName,
                          java.sql.Time x)
                   throws java.sql.SQLException
Sets the designated parameter to a Java Time value.

Specified by:
setTimeAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setTimestamp

public void setTimestamp(int paramIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException
Sets the designated parameter to a java.sql.Timestamp value.

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setTimestampAtName

public void setTimestampAtName(java.lang.String paramName,
                               java.sql.Timestamp x)
                        throws java.sql.SQLException
Sets the designated parameter to a Java Timestamp value.

Specified by:
setTimestampAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setINTERVALYM

public void setINTERVALYM(int paramIndex,
                          INTERVALYM x)
                   throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.INTERVALYM value.

Specified by:
setINTERVALYM in interface OraclePreparedStatement
Parameters:
paramIndex - specifies the parameter index. Index starts from 1.
x - specifies the parameter value.
Throws:
java.sql.SQLException - if an error occurred.
Since:
9i

setINTERVALYMAtName

public void setINTERVALYMAtName(java.lang.String paramName,
                                INTERVALYM x)
                         throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.INTERVALYM.

Specified by:
setINTERVALYMAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setINTERVALDS

public void setINTERVALDS(int paramIndex,
                          INTERVALDS x)
                   throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.INTERVALDS value.

Specified by:
setINTERVALDS in interface OraclePreparedStatement
Parameters:
paramIndex - specifies the parameter index. Index starts from 1.
x - specifies the parameter value.
Throws:
java.sql.SQLException - if an error occurred.
Since:
10i

setINTERVALDSAtName

public void setINTERVALDSAtName(java.lang.String paramName,
                                INTERVALDS x)
                         throws java.sql.SQLException
Sets the designated parameter to a oracle.sql.INTERVALDS.

Specified by:
setINTERVALDSAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setTIMESTAMP

public void setTIMESTAMP(int paramIndex,
                         TIMESTAMP x)
                  throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.TIMESTAMP value.

Specified by:
setTIMESTAMP in interface OraclePreparedStatement
Parameters:
paramIndex - specifies the parameter index. Index starts from 1.
x - specifies the parameter value.
Throws:
java.sql.SQLException - if an error occurred.
Since:
9i

setTIMESTAMPAtName

public void setTIMESTAMPAtName(java.lang.String paramName,
                               TIMESTAMP x)
                        throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.TIMESTAMP

Specified by:
setTIMESTAMPAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setTIMESTAMPTZ

public void setTIMESTAMPTZ(int paramIndex,
                           TIMESTAMPTZ x)
                    throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.TIMESTAMPTZ value.

Specified by:
setTIMESTAMPTZ in interface OraclePreparedStatement
Parameters:
paramIndex - specifies the parameter index. Index starts from 1.
x - specifies the parameter value.
Throws:
java.sql.SQLException - if an error occurred.
Since:
9i

setTIMESTAMPTZAtName

public void setTIMESTAMPTZAtName(java.lang.String paramName,
                                 TIMESTAMPTZ x)
                          throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.TIMESTAMPTZ.

Specified by:
setTIMESTAMPTZAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setTIMESTAMPLTZ

public void setTIMESTAMPLTZ(int paramIndex,
                            TIMESTAMPLTZ x)
                     throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.TIMESTAMPLTZ value.

In order to use this method, the calling program must first invoke OracleConnection.setSessionTimeZone() to set the session time zone.

Specified by:
setTIMESTAMPLTZ in interface OraclePreparedStatement
Parameters:
paramIndex - specifies the parameter index. Index starts from 1.
x - specifies the parameter value.
Throws:
java.sql.SQLException - if an error occurred.
Since:
9i

setTIMESTAMPLTZAtName

public void setTIMESTAMPLTZAtName(java.lang.String paramName,
                                  TIMESTAMPLTZ x)
                           throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.TIMESTAMPLTZ.

Specified by:
setTIMESTAMPLTZAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setAsciiStream

public void setAsciiStream(int paramIndex,
                           java.io.InputStream istream,
                           int length)
                    throws java.sql.SQLException
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a LONG parameter, it may be more practical to send it via a InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: There are restrictions to use this method for CLOBs. Please see details in Oracle JDBC documents or Readme to avoid data lossage.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Parameters:
istream - the Java input stream that contains the ASCII parameter value
length - the number of bytes in the stream
Throws:
java.sql.SQLException - if a database access error occurs

setAsciiStreamAtName

public void setAsciiStreamAtName(java.lang.String paramName,
                                 java.io.InputStream stream,
                                 int length)
                          throws java.sql.SQLException
Sets the designated parameter to a the value read from a stream. It is an error if the named parameter appears more than once in the SQL string.

Specified by:
setAsciiStreamAtName in interface OraclePreparedStatement
Parameters:
stream -
length -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryStream

public void setBinaryStream(int paramIndex,
                            java.io.InputStream istream,
                            int length)
                     throws java.sql.SQLException
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONG RAW parameter, it may be more practical to send it via a InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.

Note: There are restrictions to use this method for BLOBs. Please see details in Oracle JDBC documents or Readme to avoid data lossage.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Parameters:
istream - the java input stream which contains the binary parameter value
length - the number of bytes in the stream
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryStreamAtName

public void setBinaryStreamAtName(java.lang.String paramName,
                                  java.io.InputStream stream,
                                  int length)
                           throws java.sql.SQLException
Sets the designated parameter to the value in a stream. It is an error if the named parameter appears more than once in the SQL string.

Specified by:
setBinaryStreamAtName in interface OraclePreparedStatement
Parameters:
stream -
length -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setUnicodeStream

public void setUnicodeStream(int paramIndex,
                             java.io.InputStream istream,
                             int length)
                      throws java.sql.SQLException
Deprecated.  

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 LONG parameter, it may be more practical to send it via a InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format. The byte format of the Unicode stream is the 2 bytes UCS-2 encoding.

Note: There are restrictions to use this method for CLOBs. Please see details in Oracle JDBC documents or Readme to avoid data lossage.

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement
Parameters:
istream - the java input stream which contains the UNICODE parameter value
length - the number of bytes in the stream
Throws:
java.sql.SQLException - if a database access error occurs

setUnicodeStreamAtName

public void setUnicodeStreamAtName(java.lang.String paramName,
                                   java.io.InputStream stream,
                                   int length)
                            throws java.sql.SQLException
Sets the designated parameter to the value in a stream. It is an error if the named parameter appears more than once in the SQL string.

Specified by:
setUnicodeStreamAtName in interface OraclePreparedStatement
Parameters:
stream -
length -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setCustomDatum

public void setCustomDatum(int paramIndex,
                           CustomDatum x)
                    throws java.sql.SQLException
Deprecated.  

Set the designated parameter to a oracle.sql.CustomDatum value.

This method is deprecated. It is recommended to use setORAData().

Specified by:
setCustomDatum in interface OraclePreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setCustomDatumAtName

public void setCustomDatumAtName(java.lang.String paramName,
                                 CustomDatum x)
                          throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.CustomDatum.

Specified by:
setCustomDatumAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setORAData

public void setORAData(int paramIndex,
                       ORAData x)
                throws java.sql.SQLException
Set the designated parameter to an oracle.sql.ORAData value.

This is an Oracle specific method.

Specified by:
setORAData in interface OraclePreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setORADataAtName

public void setORADataAtName(java.lang.String paramName,
                             ORAData x)
                      throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.ORAData.

Specified by:
setORADataAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setObject

public void setObject(int paramIndex,
                      java.lang.Object x,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException

Sets the value of a parameter using an object. The second argument must be an object type.

The given Java object will be converted to the targetSqlType before 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 writeSQL to write it to the SQL data stream.

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
x - the object containing the input parameter value
targetSqlType - the SQL type (as defined in java.sql.Types or OracleTypes) to be sent to the database.
scale - for numeric types. Ignored for other types.
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
Types

setObjectAtName

public void setObjectAtName(java.lang.String paramName,
                            java.lang.Object x,
                            int targetSqlType,
                            int scale)
                     throws java.sql.SQLException
Sets the designated parameter to a Java Object

Specified by:
setObjectAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
targetSqlType -
scale -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setObject

public void setObject(int paramIndex,
                      java.lang.Object x,
                      int targetSqlType)
               throws java.sql.SQLException
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.

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
x - the object containing the input parameter value
targetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database
Throws:
java.sql.SQLException - if a database access error occurs

setObjectAtName

public void setObjectAtName(java.lang.String paramName,
                            java.lang.Object x,
                            int targetSqlType)
                     throws java.sql.SQLException
Sets the designated parameter to a Java Object.

Specified by:
setObjectAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
targetSqlType -
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setRefType

public void setRefType(int paramIndex,
                       REF ref)
                throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.REF value.

Specified by:
setRefType in interface OraclePreparedStatement
Parameters:
ref - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
setREF

setRefTypeAtName

public void setRefTypeAtName(java.lang.String paramName,
                             REF x)
                      throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.REF value.

Specified by:
setRefTypeAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setRef

public void setRef(int paramIndex,
                   java.sql.Ref ref)
            throws java.sql.SQLException
JDBC 2.0 Sets a Ref(<structured-type>) parameter.

Specified by:
setRef in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if a database access error occurs

setRefAtName

public void setRefAtName(java.lang.String paramName,
                         java.sql.Ref x)
                  throws java.sql.SQLException
Sets the designated parameter to a Ref.

Specified by:
setRefAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setREF

public void setREF(int paramIndex,
                   REF ref)
            throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.REF value.

Specified by:
setREF in interface OraclePreparedStatement
Parameters:
ref - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setREFAtName

public void setREFAtName(java.lang.String paramName,
                         REF x)
                  throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.REF.

Specified by:
setREFAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setObject

public void setObject(int paramIndex,
                      java.lang.Object x)
               throws java.sql.SQLException
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.

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
x - the object containing the input parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setObjectAtName

public void setObjectAtName(java.lang.String paramName,
                            java.lang.Object x)
                     throws java.sql.SQLException
Sets the designated parameter to a Java Object.

Specified by:
setObjectAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setOracleObject

public void setOracleObject(int paramIndex,
                            Datum x)
                     throws java.sql.SQLException
Oracle specific. Sets the designated parameter to a oracle.sql.Datum value.

Specified by:
setOracleObject in interface OraclePreparedStatement
Parameters:
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setOracleObjectAtName

public void setOracleObjectAtName(java.lang.String paramName,
                                  Datum x)
                           throws java.sql.SQLException
Sets the designated parameter to an oracle.sql.Datum.

Specified by:
setOracleObjectAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

setPlsqlIndexTable

public void setPlsqlIndexTable(int paramIndex,
                               java.lang.Object arrayData,
                               int maxLen,
                               int curLen,
                               int elemSqlType,
                               int elemMaxLen)
                        throws java.sql.SQLException
Oracle OCI driver specific. Sets the designated PLSQL index table parameter.

Specified by:
setPlsqlIndexTable in interface OraclePreparedStatement
Parameters:
arrayData - a java array
maxLen - the maximum possible number of elements.
curLen - the current number of elements
elemSqlType - index table element SQL type (as defined in java.sql.Types or OracleTypes).
elemMaxLen - maximum length of the element. If not specified, maximum length allowed for that type is used.
Throws:
java.sql.SQLException - if a database access error occurs
Since:
8.1.7

setPlsqlIndexTableAtName

public void setPlsqlIndexTableAtName(java.lang.String paramName,
                                     java.lang.Object arrayData,
                                     int maxLen,
                                     int curLen,
                                     int elemSqlType,
                                     int elemMaxLen)
                              throws java.sql.SQLException
Sets the designated parameter to a Java int value.

Parameters:
arrayData - a java array
maxLen - the maximum possible number of elements.
curLen - the current number of elements
elemSqlType - index table element SQL type (as defined in java.sql.Types or OracleTypes).
elemMaxLen - maximum length of the element. If not specified, maximum length allowed for that type is used.
Throws:
java.sql.SQLException - if a database access error occurs

clearParameters

public void clearParameters()
                     throws java.sql.SQLException

In general, parameter values remain in force for repeated use of a Statement. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling clearParameters.

Specified by:
clearParameters in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setCharacterStream

public void setCharacterStream(int paramIndex,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
JDBC 2.0 Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONG parameter, it may be more practical to send it via a Reader. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: There are restrictions to use this method to access CLOBs in database. To avoid data lossage, please read Oracle JDBC documents or Reademe for details.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Parameters:
reader - the java reader which contains the UNICODE data
length - the number of characters in the stream
Throws:
java.sql.SQLException - if a database access error occurs

setDate

public void setDate(int paramIndex,
                    java.sql.Date x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
JDBC 2.0 Sets the designated parameter to a java.sql.Date value, using the given Calendar object. Since Oracle database doesn't support timezone for DATE. This method set the same value as setDate(idx, x).

Specified by:
setDate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setTime

public void setTime(int paramIndex,
                    java.sql.Time x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
JDBC 2.0 Sets the designated parameter to a java.sql.Time value, using the given Calendar object. Since Oracle database doesn't support timezone for DATE. This method set the same value as setTime(idx, x).

Specified by:
setTime in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setTimestamp

public void setTimestamp(int paramIndex,
                         java.sql.Timestamp x,
                         java.util.Calendar cal)
                  throws java.sql.SQLException
JDBC 2.0 Sets the designated parameter to a java.sql.Timestamp value, using the given Calendar object. Since Oracle database doesn't support timezone for DATE. This method set the same value as setTimestamp(idx, x).

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

addBatch

public void addBatch()
              throws java.sql.SQLException
Add a set of parameters to the batch.

Specified by:
addBatch in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if an error occurred.
Since:
8.1.6 (JDBC 2.0).

addBatch

public void addBatch(java.lang.String sql)
              throws java.sql.SQLException
This method cannot be used in OraclePreparedStatement.

Specified by:
addBatch in interface java.sql.Statement
Overrides:
addBatch in class OracleStatement
Parameters:
sql - typically this is a static SQL INSERT or UPDATE statement.
Throws:
java.sql.SQLException - if an error occurred.

clearBatch

public void clearBatch()
                throws java.sql.SQLException
Make the set of parameters in the current batch empty.

Specified by:
clearBatch in interface java.sql.Statement
Overrides:
clearBatch in class OracleStatement
Throws:
java.sql.SQLException - if a database access error occurred. This can be used for clear both Jdbc & Oracle type batching.
Since:
8.1.6 (JDBC 2.0).

executeBatch

public int[] executeBatch()
                   throws java.sql.SQLException
Submit a batch of parameters to the database for execution.

Commands are executed in the order in which they were added to the batch. This method closes the calling Statement object's current set if one is open. The statement's internal list of batch commands is reset to empty once this method returns.

Specified by:
executeBatch in interface java.sql.Statement
Overrides:
executeBatch in class OracleStatement
Returns:
an array containing one entry per each element in the batch. Each value is always -2.
Throws:
java.sql.BatchUpdateException - if any of the commands in the batch failed to execute properly. (For example, the batch will fail if it contained a command that returns a result set.)
java.sql.SQLException
Since:
8.1.6 (JDBC 2.0).

setDisableStmtCaching

public void setDisableStmtCaching(boolean cache)
Don't Cache this object even when the corresponding Connection is Cache Enabled.

Specified by:
setDisableStmtCaching in interface OraclePreparedStatement
Parameters:
cache - Set it to true, if you don't want this statement to be cached.

setFormOfUse

public void setFormOfUse(int paramIndex,
                         short formOfUse)
Sets the "Form Of Use". See the javadoc in the interface.

Specified by:
setFormOfUse in interface OraclePreparedStatement
Parameters:
paramIndex - index of the column in the preparedStatment
formOfUse - use FORM_CHAR for CHAR, VARCHAR2 and CLOB data, or FORM_NCHAR for NCHAR, NVARCHAR2 and NCLOB data. FORM_CHAR is the default.

setURL

public void setURL(int paramIndex,
                   java.net.URL x)
            throws java.sql.SQLException
JDBC 3.0 Sets the designated parameter to the given java.net.URL value. The driver converts this to an SQL DATALINK value when it sends it to the database.

Specified by:
setURL in interface java.sql.PreparedStatement
Parameters:
x - the java.net.URL object to be set
Throws:
java.sql.SQLException - if a database access error occurs
Since:
9.0.2

setURLAtName

public void setURLAtName(java.lang.String paramName,
                         java.net.URL x)
                  throws java.sql.SQLException
Oracle extension Sets the designated parameter to a java.net.URL value.

Specified by:
setURLAtName in interface OraclePreparedStatement
Parameters:
x - the parameter value
paramName -
Throws:
java.sql.SQLException - if a database access error occurs

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
Specified by:
getParameterMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

OracleGetParameterMetaData

public OracleParameterMetaData OracleGetParameterMetaData()
                                                   throws java.sql.SQLException
Oracle extension Retrieves the number, types and properties of this oracle.jdbc.PreparedStatement object's parameters.

Specified by:
OracleGetParameterMetaData in interface OraclePreparedStatement
Returns:
an oracle.jdbc.OracleParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters
Throws:
java.sql.SQLException - if a database access error occurs
Since:
9.0.2
See Also:
OracleParameterMetaData

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

notify_close_rset

public void notify_close_rset()
                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getRevisedSql

public java.lang.String getRevisedSql()
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

getOriginalSql

public java.lang.String getOriginalSql()
                                throws java.sql.SQLException
Throws:
java.sql.SQLException

getResultSetCache

public oracle.jdbc.driver.OracleResultSetCache getResultSetCache()
                                                          throws java.sql.SQLException
Throws:
java.sql.SQLException

setAutoRefetch

public void setAutoRefetch(boolean)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

getAutoRefetch

public boolean getAutoRefetch()
                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getMaxFieldSize

public int getMaxFieldSize()
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

Oracle10g JDBC

Copyright © 1998,2004, Oracle. All rights reserved