public class IfxPreparedStatement extends IfxStatement implements IfmxPreparedStatement, PreparedStatement2
A SQL statement is pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.
Note: The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type Integer then setInt should be used.
If arbitrary parameter type conversions are required then the setObject method should be used with a target SQL type.
Connection.prepareStatement(java.lang.String),
ResultSet| Modifier and Type | Field and Description |
|---|---|
protected long |
namedCalls |
protected long |
ordinalCalls |
protected java.util.Vector<IfxObject> |
vector |
BatchParamVector, BatchVector, Closed, commandString, currentResult, cursorOpen, executeBatchInProgress, jconn, numqmarks, outputMetaData, pool, poolable, prot, SGK_ALL_KEYS, SGK_indexes, SGK_KEYS_BY_INDEX, SGK_KEYS_BY_NAME, SGK_metaData, SGK_names, SGK_NO_KEYS, SGK_resultSet, statementType| Modifier and Type | Method and Description |
|---|---|
void |
addBatch()
JDBC 2.0
Add a set of parameters to the batch.
|
void |
addBatch(java.lang.String sql)
JDBC 2.0
Adds a SQL command to the current batch of commmands for the statement.
|
protected boolean |
ambiguousSQLType(int sqltype) |
protected void |
checkParameterIndex(int i,
int qmarks) |
void |
clearBatch()
JDBC 2.0
Make the set of commands in the current batch empty.
|
void |
clearBindColType()
Reset the values set by calling setBindColType()
|
void |
clearParameters()
In general parameter values remain in force for repeated use of a
Statement.
|
void |
close()
In many cases, it is desirable to immediately release a
Statements's database and JDBC resources instead of waiting for
this to happen when it is automatically closed; the close
method provides this immediate release.
|
void |
closeCursor()
Will issue SQ_CLOSE with currently active statement id, resulting in
database releasing the lock on currently active cursor.
|
boolean |
execute()
Some prepared statements return multiple results; the execute
method handles these complex statements as well as the simpler
form of statements handled by executeQuery and executeUpdate.
|
boolean |
execute(java.lang.String sql)
Execute a SQL statement that may return multiple results.
|
boolean |
execute(java.lang.String sql,
int returnKeys) |
boolean |
execute(java.lang.String sql,
int[] columnIndexes) |
boolean |
execute(java.lang.String sql,
java.lang.String[] columnNames) |
int[] |
executeBatch()
JDBC 2.0
Submit a batch of commands to the database for execution.
|
java.sql.ResultSet |
executeQuery()
A prepared SQL query is executed and its ResultSet is returned.
|
java.sql.ResultSet |
executeQuery(boolean withHold)
A prepared SQL query is executed and its ResultSet is returned.
|
java.sql.ResultSet |
executeQuery(boolean withHold,
boolean withReOptimization)
An Informix executeQuery() extension to specify whether the
result should be a HOLD ResultSet (cursor) or not and if the
query plan should be reoptimized if the data for the preparedstatement
object has changed.
|
java.sql.ResultSet |
executeQuery(java.lang.String sql)
Execute a SQL statement that returns a single ResultSet.
|
java.sql.ResultSet |
executeQuery(java.lang.String sql,
boolean withhold)
Execute a SQL statement that returns a single ResultSet.
|
int |
executeUpdate()
Execute a SQL INSERT, UPDATE or DELETE statement.
|
int |
executeUpdate(java.lang.String sql)
Execute a SQL INSERT, UPDATE or DELETE statement.
|
int |
executeUpdate(java.lang.String sql,
int returnKeys)
Execute a SQL INSERT, UPDATE or DELETE statement.
|
int |
executeUpdate(java.lang.String sql,
int[] columnIndexes)
Execute a SQL INSERT, UPDATE or DELETE statement.
|
int |
executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
Execute a SQL INSERT, UPDATE or DELETE statement.
|
java.sql.ResultSetMetaData |
getMetaData()
The number, types and properties of a ResultSet's columns
are provided by the getMetaData method.
|
java.sql.ParameterMetaData |
getParameterMetaData() |
protected java.sql.ParameterMetaData |
getParameterMetaData(java.lang.String signature,
boolean isProc,
java.lang.String procName,
int numParams) |
IfxProtocol |
getResultSetProtocol()
Returns the Protocol object created by the currentResult variable
for Connected RowSets.
|
void |
IfxSetObject(int i,
java.lang.Object x,
int ifxType)
This method is the same as the setObject() method with the
exception that the driver will convert the object to the given
ifxtype when sending to the database.
|
void |
IfxSetObject(int i,
java.lang.Object x,
int scale,
int ifxType)
This method is the same as the setObject() method with the
exception that the driver will convert the object to the given
ifxtype when sending to the database.
|
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setArray(int i,
java.sql.Array x)
JDBC 2.0
Set an Array parameter.
|
void |
setArray(int i,
java.sql.Array x,
int ifxType)
JDBC 2.0
Set an Array parameter.
|
protected void |
setArray(int i,
java.sql.Array x,
java.lang.String collectionType)
Set an Array parameter.
|
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x) |
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
When a very large ASCII value is input to a LONGVARCHAR
parameter it may be more practical to send it via a
java.io.InputStream.
|
void |
setAsciiStream(int i,
java.io.InputStream x,
int length,
int ifxType)
When a very large ASCII value is input to a LONGVARCHAR
parameter it may be more practical to send it via a
java.io.InputStream.
|
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
long length) |
void |
setBigDecimal(int i,
java.math.BigDecimal x)
Set a parameter to a java.lang.BigDecimal value.
|
void |
setBigDecimal(int i,
java.math.BigDecimal x,
int ifxType)
Set a parameter to a java.lang.BigDecimal value.
|
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x) |
void |
setBinaryStream(int paramterIndex,
java.io.InputStream x,
int length)
When a very large binary value is input to a LONGVARBINARY
parameter it may be more practical to send it via a
java.io.InputStream.
|
void |
setBinaryStream(int i,
java.io.InputStream x,
int length,
int ifxType)
When a very large binary value is input to a LONGVARBINARY
parameter it may be more practical to send it via a
java.io.InputStream.
|
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
long length) |
void |
setBindColIfxType(int colIndex,
int ifxtype)
Similar to setBindColType(), but used when application wants
to use Informix SQL types in it's parameter call.
|
void |
setBindColIfxType(int colIndex,
int ifxtype,
int scale)
Allows applications to specify the output
type to be IFX_TYPE_DECIMAL, IFX_TYPE_MONEY
so that the server can cast to that type before returning
to the client.
|
void |
setBindColIfxType(int colIndex,
int ifxtype,
java.lang.String name)
Allows applications to specify the output
type to be IFX_TYPE_LIST, IFX_TYPE_ROW, IFX_TYPE_MULTISET,
IFX_TYPE_SET, IFX_TYPE_UDTVAR, IFX_TYPE_UDTFIXED
so that the server can cast to that type before returning
to the client.
|
void |
setBindColType(int colIndex,
int sqltype)
Allows applications to specify the output
type of the resultset values so that the server can cast
to that type before returning to the client.
|
void |
setBindColType(int colIndex,
int sqltype,
int scale)
Allows applications to specify the output
type to be java.sql.DECIMAL or java.sql.NUMERIC,
so that the server can cast to that type before returning
to the client.
|
void |
setBindColType(int colIndex,
int sqltype,
java.lang.String name)
Allows applications to specify the output
type to be java.sql.STRUCT, java.sql.ARRAY, java.sql.DISTINCT,
and java.sql.JAVA_OBJECT so that the server can cast
to that type before returning to the client.
|
void |
setBlob(int i,
java.sql.Blob x)
JDBC 2.0
Set a BLOB parameter.
|
void |
setBlob(int i,
java.sql.Blob x,
int ifxType)
JDBC 2.0
Set a BLOB parameter.
|
void |
setBlob(int parameterIndex,
java.io.InputStream inputStream) |
void |
setBlob(int parameterIndex,
java.io.InputStream inputStream,
long length) |
void |
setBoolean(int i,
boolean x)
Set a parameter to a Java boolean value.
|
void |
setBoolean(int i,
boolean x,
int ifxType)
Set a parameter to a Java boolean value.
|
void |
setByte(int i,
byte x)
Set a parameter to a Java byte value.
|
void |
setByte(int i,
byte x,
int ifxType)
Set a parameter to a Java byte value.
|
void |
setBytes(int i,
byte[] x)
Set a parameter to a Java array of bytes.
|
void |
setBytes(int i,
byte[] x,
int ifxType)
Set a parameter to a Java array of bytes.
|
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader) |
void |
setCharacterStream(int i,
java.io.Reader x,
int length)
JDBC 2.0
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader.
|
void |
setCharacterStream(int i,
java.io.Reader x,
int length,
int ifxType)
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader.
|
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setClob(int i,
java.sql.Clob x)
JDBC 2.0
Set a CLOB parameter.
|
void |
setClob(int i,
java.sql.Clob x,
int ifxType)
JDBC 2.0
Set a CLOB parameter.
|
void |
setClob(int parameterIndex,
java.io.Reader reader) |
void |
setClob(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setDate(int i,
java.sql.Date x)
Set a parameter to a java.sql.Date value.
|
void |
setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
Set a parameter to a java.sql.Date value.
|
void |
setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal,
int ifxType)
Set a parameter to a java.sql.Date value.
|
void |
setDate(int i,
java.sql.Date x,
int ifxType)
Set a parameter to a java.sql.Date value.
|
void |
setDouble(int i,
double x)
Set a parameter to a Java double value.
|
void |
setDouble(int i,
double x,
int ifxType)
Set a parameter to a Java double value.
|
void |
setFloat(int i,
float x)
Set a parameter to a Java float value.
|
void |
setFloat(int i,
float x,
int ifxType)
Set a parameter to a Java float value.
|
void |
setIfxBSONObject(int i,
IfxBSONObject x)
Sets a parameter to an IfxBSONObject value.
|
void |
setInt(int i,
int x)
Set a parameter to a Java int value.
|
void |
setInt(int i,
int x,
int ifxType)
Set a parameter to a Java int value.
|
void |
setInterval(int i,
Interval x)
Set a parameter to an Interval value.
|
void |
setIntervalDF(int i,
IntervalDF x)
Set a parameter to an IntervalDF value.
|
void |
setIntervalYM(int i,
IntervalYM x)
Set a parameter to an IntervalYM value.
|
void |
setLong(int i,
long x)
Set a parameter to a Java long value.
|
void |
setLong(int i,
long x,
int ifxType)
Set a parameter to a Java long value.
|
void |
setNCharacterStream(int parameterIndex,
java.io.Reader value) |
void |
setNCharacterStream(int parameterIndex,
java.io.Reader value,
long length) |
void |
setNClob(int parameterIndex,
java.sql.NClob value) |
void |
setNClob(int parameterIndex,
java.io.Reader reader) |
void |
setNClob(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setNString(int parameterIndex,
java.lang.String value) |
void |
setNull(int i,
int sqlType)
Set a parameter to SQL NULL.
|
void |
setNull(int i,
int sqlType,
int ifxType)
Set a parameter to SQL NULL.
|
protected void |
setNull(int i,
int sqlType,
int ifxType,
java.lang.String name)
Set a parameter to SQL NULL.
|
void |
setNull(int i,
int sqlType,
java.lang.String name)
Set a parameter to SQL NULL.
|
void |
setObject(int i,
java.lang.Object x) |
void |
setObject(int i,
java.lang.Object x,
int targetSqlType)
This method is like setObject above, but assumes scale of zero.
|
void |
setObject(int i,
java.lang.Object x,
int targetSqlType,
int scale)
Set the value of a parameter using an object; use the
java.lang equivalent objects for integral values.
|
protected void |
setObject(int i,
java.lang.Object x,
java.lang.String name) |
void |
setRef(int i,
java.sql.Ref x)
JDBC 2.0
Set a REF(<structured-type>) parameter.
|
void |
setRowId(int parameterIndex,
java.sql.RowId x) |
void |
setShort(int i,
short x)
Set a parameter to a Java short value.
|
void |
setShort(int i,
short x,
int ifxType)
Set a parameter to a Java short value.
|
void |
setSQLXML(int parameterIndex,
java.sql.SQLXML xmlObject) |
void |
setString(int i,
java.lang.String x)
Set a parameter to a Java String value.
|
void |
setString(int i,
java.lang.String x,
int ifxType)
This method is Informix extension method and
NOT a JDBC standard method.
|
void |
setTime(int i,
java.sql.Time x)
Set a parameter to a java.sql.Time value.
|
void |
setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
Set a parameter to a java.sql.Time value.
|
void |
setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal,
int ifxType)
Set a parameter to a java.sql.Time value.
|
void |
setTime(int i,
java.sql.Time x,
int ifxType)
Set a parameter to a java.sql.Time value.
|
void |
setTimestamp(int i,
java.sql.Timestamp x)
Set a parameter to a java.sql.Timestamp value.
|
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
Set a parameter to a java.sql.Timestamp value.
|
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal,
int ifxType)
Set a parameter to a java.sql.Timestamp value.
|
void |
setTimestamp(int i,
java.sql.Timestamp x,
int ifxType)
Set a parameter to a java.sql.Timestamp value.
|
void |
setUnicodeStream(int i,
java.io.InputStream x,
int length)
Deprecated.
|
void |
setURL(int parameterIndex,
java.net.URL x) |
protected void |
superClose() |
<T> T |
unwrap(java.lang.Class<T> iface) |
cancel, chkAndSetGetRsltCalledFlag, clearWarnings, closeOnCompletion, executeImpl, executeQueryImpl, getAutoFree, getBigSerial, getConnection, getCursorName, getFetchBufferSize, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSerial, getSerial8, getStatementType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, resetMethodCalledFlags, scrubBatch, setAutoFree, setCursorName, setEscapeProcessing, setFetchBufferSize, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setResultSetConcurrency, setResultSetType, setStatementType, transferWarningsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, clearWarnings, closeOnCompletion, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutprotected java.util.Vector<IfxObject> vector
protected long ordinalCalls
protected long namedCalls
public java.sql.ResultSet executeQuery()
throws java.sql.SQLException
executeQuery in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic java.sql.ResultSet executeQuery(boolean withHold)
throws java.sql.SQLException
executeQuery in interface IfmxPreparedStatementwithHold - use Cursor With Hold or notjava.sql.SQLExceptionpublic int executeUpdate()
throws java.sql.SQLException
executeUpdate in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic boolean execute()
throws java.sql.SQLException
execute in interface java.sql.PreparedStatementjava.sql.SQLExceptionStatement.execute(java.lang.String)public boolean execute(java.lang.String sql)
throws java.sql.SQLException
IfxStatementexecute in interface java.sql.Statementexecute in class IfxStatementsql - any SQL statementjava.sql.SQLExceptionIfxStatement.getResultSet(),
IfxStatement.getUpdateCount(),
IfxStatement.getMoreResults()public boolean execute(java.lang.String sql,
int returnKeys)
throws java.sql.SQLException
execute in interface java.sql.Statementexecute in class IfxStatementjava.sql.SQLExceptionpublic boolean execute(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
execute in interface java.sql.Statementexecute in class IfxStatementjava.sql.SQLExceptionpublic boolean execute(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
execute in interface java.sql.Statementexecute in class IfxStatementjava.sql.SQLExceptionpublic java.sql.ResultSet executeQuery(java.lang.String sql)
throws java.sql.SQLException
IfxStatementexecuteQuery in interface java.sql.StatementexecuteQuery in class IfxStatementsql - typically this is a static SQL SELECT statementjava.sql.SQLExceptionpublic java.sql.ResultSet executeQuery(java.lang.String sql,
boolean withhold)
throws java.sql.SQLException
IfxStatementexecuteQuery in interface IfmxStatementexecuteQuery in class IfxStatementsql - typically this is a static SQL SELECT statementwithhold - use Cursor With Hold or notjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String sql)
throws java.sql.SQLException
IfxStatementexecuteUpdate in interface java.sql.StatementexecuteUpdate in class IfxStatementsql - a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String sql,
int returnKeys)
throws java.sql.SQLException
IfxStatementexecuteUpdate in interface java.sql.StatementexecuteUpdate in class IfxStatementsql - a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
IfxStatementexecuteUpdate in interface java.sql.StatementexecuteUpdate in class IfxStatementsql - a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
IfxStatementexecuteUpdate in interface java.sql.StatementexecuteUpdate in class IfxStatementsql - a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothingjava.sql.SQLExceptionpublic void setNull(int i,
int sqlType)
throws java.sql.SQLException
Note: You must specify the parameter's SQL type.
setNull in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...sqlType - SQL type code defined by java.sql.Typesjava.sql.SQLExceptionIfxTypespublic void setNull(int i,
int sqlType,
int ifxType)
throws java.sql.SQLException
Note: You must specify the parameter's SQL type.
setNull in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...sqlType - SQL type code defined by java.sql.Typesjava.sql.SQLExceptionIfxTypespublic void setNull(int i,
int sqlType,
java.lang.String name)
throws java.sql.SQLException
Note: You must specify the parameter's SQL type.
setNull in interface PreparedStatement2setNull in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...sqlType - SQL type code defined by java.sql.Typesjava.sql.SQLExceptionprotected void setNull(int i,
int sqlType,
int ifxType,
java.lang.String name)
throws java.sql.SQLException
Note: You must specify the parameter's SQL type.
parameterIndex - the first parameter is 1, the second is 2, ...sqlType - SQL type code defined by java.sql.TypesifxType - Informix type code defined by com.informix.lang.IfxTypesname - Opaque type name, distinct type name or complex type
definitionjava.sql.SQLExceptionpublic void setBigDecimal(int i,
java.math.BigDecimal x)
throws java.sql.SQLException
setBigDecimal in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLException - if a database-access error occurs.public void setBigDecimal(int i,
java.math.BigDecimal x,
int ifxType)
throws java.sql.SQLException
setBigDecimal in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setBoolean(int i,
boolean x)
throws java.sql.SQLException
setBoolean in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setBoolean(int i,
boolean x,
int ifxType)
throws java.sql.SQLException
setBoolean in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setByte(int i,
byte x)
throws java.sql.SQLException
setByte in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setByte(int i,
byte x,
int ifxType)
throws java.sql.SQLException
setByte in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setShort(int i,
short x)
throws java.sql.SQLException
setShort in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setShort(int i,
short x,
int ifxType)
throws java.sql.SQLException
setShort in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setInt(int i,
int x)
throws java.sql.SQLException
setInt in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setInt(int i,
int x,
int ifxType)
throws java.sql.SQLException
setInt in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setLong(int i,
long x)
throws java.sql.SQLException
setLong in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setLong(int i,
long x,
int ifxType)
throws java.sql.SQLException
setLong in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setFloat(int i,
float x)
throws java.sql.SQLException
setFloat in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setFloat(int i,
float x,
int ifxType)
throws java.sql.SQLException
setFloat in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setDouble(int i,
double x)
throws java.sql.SQLException
setDouble in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setDouble(int i,
double x,
int ifxType)
throws java.sql.SQLException
setDouble in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setString(int i,
java.lang.String x)
throws java.sql.SQLException
setString in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setString(int i,
java.lang.String x,
int ifxType)
throws java.sql.SQLException
setString in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setBytes(int i,
byte[] x)
throws java.sql.SQLException
setBytes in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setBytes(int i,
byte[] x,
int ifxType)
throws java.sql.SQLException
setBytes in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setDate(int i,
java.sql.Date x)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setDate(int i,
java.sql.Date x,
int ifxType)
throws java.sql.SQLException
setDate in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setTime(int i,
java.sql.Time x)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setTime(int i,
java.sql.Time x,
int ifxType)
throws java.sql.SQLException
setTime in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setTimestamp(int i,
java.sql.Timestamp x)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setTimestamp(int i,
java.sql.Timestamp x,
int ifxType)
throws java.sql.SQLException
setTimestamp in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.IfxTypespublic void setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.
setAsciiStream in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the ASCII parameter valuelength - the number of bytes in the streamjava.sql.SQLExceptionpublic void setAsciiStream(int i,
java.io.InputStream x,
int length,
int ifxType)
throws java.sql.SQLException
Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.
setAsciiStream in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the ASCII parameter valuelength - the number of bytes in the streamifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setUnicodeStream(int i,
java.io.InputStream x,
int length)
throws java.sql.SQLException
Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.
setUnicodeStream in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the
UNICODE parameter value @param length the number of bytes in
the streamjava.sql.SQLExceptionpublic void setBinaryStream(int paramterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.
setBinaryStream in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the binary parameter valuelength - the number of bytes in the streamjava.sql.SQLExceptionpublic void setBinaryStream(int i,
java.io.InputStream x,
int length,
int ifxType)
throws java.sql.SQLException
Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.
setBinaryStream in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the binary parameter valuelength - the number of bytes in the streamifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.IfxTypespublic void setInterval(int i,
Interval x)
throws java.sql.SQLException
setInterval in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setIntervalYM(int i,
IntervalYM x)
throws java.sql.SQLException
setIntervalYM in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic void setIntervalDF(int i,
IntervalDF x)
throws java.sql.SQLException
setIntervalDF in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLExceptionpublic 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.
clearParameters in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setObject(int i,
java.lang.Object x,
int targetSqlType,
int scale)
throws java.sql.SQLException
Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.
The given Java object will be converted to the targetSqlType before being sent to the database.
Note that this method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type and using a targetSqlType of java.sql.types.OTHER.
setObject in interface java.sql.PreparedStatementparameterIndex - The first parameter is 1, the second is 2, ...x - The object containing the input parameter valuetargetSqlType - The SQL type (as defined in java.sql.Types) to be
sent to the database. The scale argument may further qualify this type.scale - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
this is the number of digits after the decimal. For all other
types this value will be ignored,java.sql.SQLExceptionTypespublic void setObject(int i,
java.lang.Object x,
int targetSqlType)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setObject(int i,
java.lang.Object x)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionprotected void setObject(int i,
java.lang.Object x,
java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void IfxSetObject(int i,
java.lang.Object x,
int scale,
int ifxType)
throws java.sql.SQLException
This method is the same as the setObject() method with the exception that the driver will convert the object to the given ifxtype when sending to the database.
IfxSetObject in interface IfmxPreparedStatementparameterIndex - The first parameter is 1, the second is 2, ...x - The object containing the input parameter valuescale - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
this is the number of digits after the decimal. For all other
types this value will be ignored,ifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypespublic void IfxSetObject(int i,
java.lang.Object x,
int ifxType)
throws java.sql.SQLException
This method is the same as the setObject() method with the exception that the driver will convert the object to the given ifxtype when sending to the database.
IfxSetObject in interface IfmxPreparedStatementparameterIndex - The first parameter is 1, the second is 2, ...x - The object containing the input parameter valueifxType - the Informix type to bind as.java.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypesprotected void checkParameterIndex(int i,
int qmarks)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void addBatch(java.lang.String sql)
throws java.sql.SQLException
IfxStatementaddBatch in interface java.sql.StatementaddBatch in class IfxStatementsql - typically this is a static SQL INSERT or UPDATE statementjava.sql.SQLException - if a database-access error occurs, or the
driver does not support batch statementspublic void addBatch()
throws java.sql.SQLException
addBatch in interface PreparedStatement2addBatch in interface java.sql.PreparedStatementjava.sql.SQLException - if a database-access error occurs.Statement.addBatch(java.lang.String)public int[] executeBatch()
throws java.sql.SQLException
executeBatch in interface java.sql.StatementexecuteBatch in class IfxStatementjava.sql.SQLException - if a database-access error occurs, or the
driver does not support batch statementspublic void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.StatementclearBatch in class IfxStatementjava.sql.SQLException - if a database-access error occurs, or the
driver does not support batch statementspublic void setCharacterStream(int i,
java.io.Reader x,
int length)
throws java.sql.SQLException
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream in interface PreparedStatement2setCharacterStream in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java reader which contains the UNICODE datalength - the number of characters in the streamjava.sql.SQLException - if a database-access error occurs.public void setCharacterStream(int i,
java.io.Reader x,
int length,
int ifxType)
throws java.sql.SQLException
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java reader which contains the UNICODE datalength - the number of characters in the streamifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.public void setRef(int i,
java.sql.Ref x)
throws java.sql.SQLException
setRef in interface PreparedStatement2setRef in interface java.sql.PreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing data of an SQL REF Typejava.sql.SQLExceptionpublic void setBlob(int i,
java.sql.Blob x)
throws java.sql.SQLException
setBlob in interface PreparedStatement2setBlob in interface java.sql.PreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing a BLOBjava.sql.SQLExceptionpublic void setBlob(int i,
java.sql.Blob x,
int ifxType)
throws java.sql.SQLException
setBlob in interface IfmxPreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing a BLOBifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypespublic void setClob(int i,
java.sql.Clob x)
throws java.sql.SQLException
setClob in interface PreparedStatement2setClob in interface java.sql.PreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing a CLOBjava.sql.SQLExceptionpublic void setClob(int i,
java.sql.Clob x,
int ifxType)
throws java.sql.SQLException
setClob in interface IfmxPreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing a CLOBifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypespublic void setArray(int i,
java.sql.Array x)
throws java.sql.SQLException
setArray in interface PreparedStatement2setArray in interface java.sql.PreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing an SQL arrayjava.sql.SQLExceptionpublic void setArray(int i,
java.sql.Array x,
int ifxType)
throws java.sql.SQLException
setArray in interface IfmxPreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing an SQL arrayifxType - the Informix type to bind asjava.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypesprotected void setArray(int i,
java.sql.Array x,
java.lang.String collectionType)
throws java.sql.SQLException
i - the first parameter is 1, the second is 2, ...x - an object representing an SQL arraycollectionType - Collection definitionjava.sql.SQLException - if a database-access error occurs.public void setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
throws java.sql.SQLException
setTime in interface PreparedStatement2setTime in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLException - if a database-access error occurs.public void setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal,
int ifxType)
throws java.sql.SQLException
setTime in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind as.cal - The calendar object the driver uses to construct the time.java.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypespublic java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface PreparedStatement2getMetaData in interface java.sql.PreparedStatementjava.sql.SQLException - if a database-access error occurs.public void setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
throws java.sql.SQLException
setDate in interface PreparedStatement2setDate in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the Calendar object the driver will use to construct the date
NOTE : The default Calendar is also considered to construct the datejava.sql.SQLException - if a database-access error occurs.public void setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal,
int ifxType)
throws java.sql.SQLException
setDate in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the Calendar object the driver will use to construct the dateifxType - the Informix type to bind as
NOTE : The default Calendar is also considered to construct the datejava.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypespublic void setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
throws java.sql.SQLException
setTimestamp in interface PreparedStatement2setTimestamp in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLException - if a database-access error occurs.public void setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal,
int ifxType)
throws java.sql.SQLException
setTimestamp in interface IfmxPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueifxType - the Informix type to bind ascal - The calendar object the driver uses to construct the timestamp.java.sql.SQLException - if a database-access error occurs.com.informix.jdbc.IfxTypespublic void setBindColType(int colIndex,
int sqltype)
throws java.sql.SQLException
setBindColType in interface IfmxPreparedStatementcolIndex - the first parameter is 1, the second is 2, ...sqltype - the server should cast to.java.sql.SQLExceptionpublic void setBindColType(int colIndex,
int sqltype,
int scale)
throws java.sql.SQLException
setBindColType in interface IfmxPreparedStatementcolIndex - the first parameter is 1, the second is 2, ...sqltype - the server should cast to.scale - - Java specific scale - not used by Informixjava.sql.SQLExceptionpublic void setBindColIfxType(int colIndex,
int ifxtype,
int scale)
throws java.sql.SQLException
setBindColIfxType in interface IfmxPreparedStatementcolIndex - the first parameter is 1, the second is 2, ...ifxtype - the server should cast to.scale - - Informix specific encoded lengthjava.sql.SQLExceptionpublic void setBindColType(int colIndex,
int sqltype,
java.lang.String name)
throws java.sql.SQLException
setBindColType in interface IfmxPreparedStatementcolIndex - the first parameter is 1, the second is 2, ...sqltype - the server should cast to.name - indicates the string representation of the UDT
or complex typejava.sql.SQLExceptionpublic void setBindColIfxType(int colIndex,
int ifxtype,
java.lang.String name)
throws java.sql.SQLException
setBindColIfxType in interface IfmxPreparedStatementcolIndex - the first parameter is 1, the second is 2, ...ifxtype - the server should cast to.name - indicates the string representation of the UDT
or complex typejava.sql.SQLExceptionpublic void setBindColIfxType(int colIndex,
int ifxtype)
throws java.sql.SQLException
setBindColIfxType in interface IfmxPreparedStatementcolIndex - the first parameter is 1, the second is 2, ...ifxtype - the server should cast to.java.sql.SQLExceptionprotected boolean ambiguousSQLType(int sqltype)
public void clearBindColType()
throws java.sql.SQLException
clearBindColType in interface IfmxPreparedStatementjava.sql.SQLExceptionpublic IfxProtocol getResultSetProtocol() throws java.sql.SQLException
java.sql.SQLExceptionpublic void setURL(int parameterIndex,
java.net.URL x)
throws java.sql.SQLException
setURL in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic java.sql.ParameterMetaData getParameterMetaData()
throws java.sql.SQLException
getParameterMetaData in interface java.sql.PreparedStatementjava.sql.SQLExceptionprotected java.sql.ParameterMetaData getParameterMetaData(java.lang.String signature,
boolean isProc,
java.lang.String procName,
int numParams)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setAsciiStream(int parameterIndex,
java.io.InputStream x)
throws java.sql.SQLException
setAsciiStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setAsciiStream(int parameterIndex,
java.io.InputStream x,
long length)
throws java.sql.SQLException
setAsciiStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBinaryStream(int parameterIndex,
java.io.InputStream x)
throws java.sql.SQLException
setBinaryStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBinaryStream(int parameterIndex,
java.io.InputStream x,
long length)
throws java.sql.SQLException
setBinaryStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBlob(int parameterIndex,
java.io.InputStream inputStream)
throws java.sql.SQLException
setBlob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBlob(int parameterIndex,
java.io.InputStream inputStream,
long length)
throws java.sql.SQLException
setBlob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setCharacterStream(int parameterIndex,
java.io.Reader reader)
throws java.sql.SQLException
setCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setCharacterStream(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setClob(int parameterIndex,
java.io.Reader reader)
throws java.sql.SQLException
setClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setClob(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNCharacterStream(int parameterIndex,
java.io.Reader value)
throws java.sql.SQLException
setNCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNCharacterStream(int parameterIndex,
java.io.Reader value,
long length)
throws java.sql.SQLException
setNCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNClob(int parameterIndex,
java.sql.NClob value)
throws java.sql.SQLException
setNClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNClob(int parameterIndex,
java.io.Reader reader)
throws java.sql.SQLException
setNClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNClob(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setNClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNString(int parameterIndex,
java.lang.String value)
throws java.sql.SQLException
setNString in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setRowId(int parameterIndex,
java.sql.RowId x)
throws java.sql.SQLException
setRowId in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setSQLXML(int parameterIndex,
java.sql.SQLXML xmlObject)
throws java.sql.SQLException
setSQLXML in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.WrapperisWrapperFor in class IfxStatementjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperunwrap in class IfxStatementjava.sql.SQLExceptionpublic void closeCursor()
throws java.sql.SQLException
IfmxPreparedStatementWill issue SQ_CLOSE with currently active statement id, resulting in database releasing the lock on currently active cursor.
This is a subset of Statement.close() method which would have closed all database resources associated with the prepared statement.
closeCursor in interface IfmxPreparedStatementjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
IfxStatementNote: A Statement is automatically closed when it is garbage collected. When a Statement is closed its current ResultSet, if one exists, is also closed.
close in interface java.lang.AutoCloseableclose in interface java.sql.Statementclose in class IfxStatementjava.sql.SQLExceptionprotected void superClose()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setIfxBSONObject(int i,
IfxBSONObject x)
throws java.sql.SQLException
IfmxPreparedStatementsetIfxBSONObject in interface IfmxPreparedStatementi - The first parameter is 1, the second is 2, and so on.x - The parameter value.java.sql.SQLExceptionpublic java.sql.ResultSet executeQuery(boolean withHold,
boolean withReOptimization)
throws java.sql.SQLException
IfmxPreparedStatementexecuteQuery in interface IfmxPreparedStatementwithHold - - specifies whether the ResultSet is a HOLD cursor, default falsewithReOptimization - - specifies whether query plan should be reoptimized, default falsejava.sql.SQLException