Serializable
, AutoCloseable
, ResultSet
, Wrapper
, RowSet
public class AS400JDBCRowSet extends Object implements RowSet, Serializable
Either the url or dataSourceName property must be set to specify how the database connection is established. The command property must be set to specify how to create the PreparedStatement.
This example creates an AS400JDBCRowSet object, populates it, and then updates its contents.
DriverManager.registerDriver(new AS400JDBCDriver()); AS400JDBCRowSet rowset = new AS400JDBCRowSet("jdbc:as400://mySystem","myUser", "myPassword"); // Set the command used to populate the list. rowset.setCommand("SELECT * FROM MYLIB.DATABASE"); // Populate the rowset. rowset.execute(); // Update the customer balances. while (rowset.next()) { double newBalance = rowset.getDouble("BALANCE") + july_statements.getPurchases(rowset.getString("CUSTNUM")); rowset.updateDouble("BALANCE", newBalance); rowset.updateRow(); }
This example creates an AS400JDBCRowSet object, sets the data source and command parameters and then populates it.
// Get the data source that is registered in JNDI (assumes JNDI environment is set). Context context = new InitialContext(); AS400JDBCDataSource dataSource = (AS400JDBCDataSource) context.lookup("jdbc/customer"); AS400JDBCRowSet rowset = new AS400JDBCRowSet(); rowset.setDataSourceName("jdbc/customer"); rowset.setUsername("myuser"); rowset.setPassword("myPasswd"); // Set the prepared statement and initialize the parameters. rowset.setCommand("SELECT * FROM MYLIBRARY.MYTABLE WHERE STATE = ? AND BALANCE > ?"); rowset.setString(1, "MINNESOTA"); rowset.setDouble(2, MAXIMUM_LIMIT); // Populate the rowset. rowset.execute();
AS400JDBCRowSet objects generate the following events:
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
Constructor | Description |
---|---|
AS400JDBCRowSet() |
Constructs a default AS400JDBCRowSet object.
|
AS400JDBCRowSet(String dataSourceName) |
Constructs an AS400JDBCRowset with the specified dataSourceName.
|
AS400JDBCRowSet(String url,
String username,
char[] password) |
Constructs an AS400JDBCRowSet with the specified parameters.
|
AS400JDBCRowSet(String url,
String username,
String password) |
Constructs an AS400JDBCRowSet with the specified parameters.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
absolute(int rowNumber) |
Positions the cursor to an absolute row number.
|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
Adds a PropertyChangeListener.
|
void |
addRowSetListener(RowSetListener listener) |
Adds a RowSetListener to the list.
|
void |
afterLast() |
Positions the cursor after the last row.
|
void |
beforeFirst() |
Positions the cursor before the first row.
|
void |
cancelRowUpdates() |
Cancels all pending updates that have been made since the last
call to updateRow().
|
void |
clearParameters() |
Clears the columns for the current row and releases all associated resources.
|
void |
clearWarnings() |
Clears all warnings that have been reported for the result set.
|
void |
close() |
Releases the rowset resources immediately instead of waiting for them to be automatically released.
|
void |
deleteRow() |
Deletes the current row from the result set and the database.
|
void |
execute() |
Executes the command and fills the rowset with data.
|
protected void |
finalize() |
Closes the Statement and Connection.
|
int |
findColumn(String columnName) |
Returns the column index for the specified column name.
|
boolean |
first() |
Positions the cursor to the first row.
|
Array |
getArray(int columnIndex) |
Returns the value of a column as an Array object.
|
Array |
getArray(String columnName) |
Returns the value of a column as an Array object.
|
InputStream |
getAsciiStream(int columnIndex) |
Returns the value of a column as a stream of ASCII
characters.
|
InputStream |
getAsciiStream(String columnName) |
Returns the value of a column as a stream of ASCII
characters.
|
BigDecimal |
getBigDecimal(int columnIndex) |
Returns the value of a column as a BigDecimal object.
|
BigDecimal |
getBigDecimal(int columnIndex,
int scale) |
Deprecated.
Use getBigDecimal(int) instead.
|
BigDecimal |
getBigDecimal(String columnName) |
Returns the value of a column as a BigDecimal object.
|
BigDecimal |
getBigDecimal(String columnName,
int scale) |
Deprecated.
Use getBigDecimal(String) instead.
|
InputStream |
getBinaryStream(int columnIndex) |
Returns the value of a column as a stream of uninterpreted
bytes.
|
InputStream |
getBinaryStream(String columnName) |
Returns the value of a column as a stream of uninterpreted
bytes.
|
Blob |
getBlob(int columnIndex) |
Returns the value of a column as a Blob object.
|
Blob |
getBlob(String columnName) |
Returns the value of a column as a Blob object.
|
boolean |
getBoolean(int columnIndex) |
Returns the value of a column as a Java boolean value.
|
boolean |
getBoolean(String columnName) |
Returns the value of a column as a Java boolean value.
|
byte |
getByte(int columnIndex) |
Returns the value of a column as a Java byte value.
|
byte |
getByte(String columnName) |
Returns the value of a column as a Java byte value.
|
byte[] |
getBytes(int columnIndex) |
Returns the value of a column as a Java byte array.
|
byte[] |
getBytes(String columnName) |
Returns the value of a column as a Java byte array.
|
Reader |
getCharacterStream(int columnIndex) |
Returns the value of a column as a character stream.
|
Reader |
getCharacterStream(String columnName) |
Returns the value of a column as a character stream.
|
Clob |
getClob(int columnIndex) |
Returns the value of a column as a Clob object.
|
Clob |
getClob(String columnName) |
Returns the value of a column as a Clob object.
|
String |
getCommand() |
Returns the command used by the statement the generate the rowset.
|
int |
getConcurrency() |
Returns the result set concurrency.
|
Context |
getContext() |
Returns the JNDI naming context which provides name-to-object bindings
and methods for retrieving and updating naming and directory services.
|
String |
getCursorName() |
Returns the name of the SQL cursor in use by the result set.
|
String |
getDataSourceName() |
Returns the name of the data source as identified in JNDI.
|
Date |
getDate(int columnIndex) |
Returns the value of a column as a java.sql.Date object using
the default calendar.
|
Date |
getDate(int columnIndex,
Calendar calendar) |
Returns the value of a column as a java.sql.Date object using
a calendar other than the default.
|
Date |
getDate(String columnName) |
Returns the value of a column as a java.sql.Date object using
the default calendar.
|
Date |
getDate(String columnName,
Calendar calendar) |
Returns the value of a column as a java.sql.Date object using
a calendar other than the default.
|
double |
getDouble(int columnIndex) |
Returns the value of a column as a Java double value.
|
double |
getDouble(String columnName) |
Returns the value of a column as a Java double value.
|
Hashtable |
getEnvironment() |
Returns a hashtable of standard JNDI environment properties.
|
boolean |
getEscapeProcessing() |
Indicates if escape processing is enabled (default).
|
int |
getFetchDirection() |
Returns the fetch direction.
|
int |
getFetchSize() |
Returns the number of rows to be fetched from the database when more rows are needed.
|
float |
getFloat(int columnIndex) |
Returns the value of a column as a Java float value.
|
float |
getFloat(String columnName) |
Returns the value of a column as a Java float value.
|
int |
getHoldability() |
Retrieves the holdability of this
RowSet object |
int |
getInt(int columnIndex) |
Returns the value of a column as a Java int value.
|
int |
getInt(String columnName) |
Returns the value of a column as a Java int value.
|
long |
getLong(int columnIndex) |
Returns the value of a column as a Java long value.
|
long |
getLong(String columnName) |
Returns the value of a column as a Java long value.
|
int |
getMaxFieldSize() |
Returns the maximum column size.
|
int |
getMaxRows() |
Returns the maximum number of rows for the rowset.
|
ResultSetMetaData |
getMetaData() |
Returns the ResultSetMetaData object that describes the
result set's columns.
|
Reader |
getNCharacterStream(int columnIndex) |
Retrieves the value of the designated column in the current row
of this
ResultSet object as a
java.io.Reader object. |
Reader |
getNCharacterStream(String columnLabel) |
Retrieves the value of the designated column in the current row
of this
ResultSet object as a
java.io.Reader object. |
NClob |
getNClob(int columnIndex) |
Retrieves the value of the designated column in the current row
of this
ResultSet object as a NClob object
in the Java programming language. |
NClob |
getNClob(String columnLabel) |
Retrieves the value of the designated column in the current row
of this
ResultSet object as a NClob object
in the Java programming language. |
String |
getNString(int columnIndex) |
Retrieves the value of the designated column in the current row
of this
ResultSet object as
a String in the Java programming language. |
String |
getNString(String columnLabel) |
Retrieves the value of the designated column in the current row
of this
ResultSet object as
a String in the Java programming language. |
Object |
getObject(int columnIndex) |
Returns the value of a column as a Java Object.
|
Object |
getObject(int columnIndex,
Class type) |
|
Object |
getObject(int columnIndex,
Map typeMap) |
Returns the value of a column as a Java Object.
|
Object |
getObject(String columnName) |
Returns the value of a column as a Java Object.
|
Object |
getObject(String columnLabel,
Class type) |
|
Object |
getObject(String columnName,
Map typeMap) |
Returns the value of a column as a Java Object.
|
String |
getPassword() |
Returns the password used to create the connection.
|
int |
getQueryTimeout() |
Returns the maximum wait time in seconds for a statement to execute.
|
Ref |
getRef(int columnIndex) |
Returns the value of a column as a Ref object.
|
Ref |
getRef(String columnName) |
Returns the value of a column as a Ref object.
|
int |
getRow() |
Returns the current row number.
|
RowId |
getRowId(int columnIndex) |
Retrieves the value of the designated column in the current row of this
ResultSet object as a java.sql.RowId object in the Java
programming language. |
RowId |
getRowId(String columnLabel) |
Retrieves the value of the designated column in the current row of this
ResultSet object as a java.sql.RowId object in the Java
programming language. |
short |
getShort(int columnIndex) |
Returns the value of a column as a Java short value.
|
short |
getShort(String columnName) |
Returns the value of a column as a Java short value.
|
SQLXML |
getSQLXML(int columnIndex) |
Retrieves the value of the designated column in the current row of
this
ResultSet as a
java.sql.SQLXML object in the Java programming language. |
SQLXML |
getSQLXML(String columnLabel) |
Retrieves the value of the designated column in the current row of
this
ResultSet as a
java.sql.SQLXML object in the Java programming language. |
Statement |
getStatement() |
Returns the statement for this result set.
|
String |
getString(int columnIndex) |
Returns the value of a column as a String object.
|
String |
getString(String columnName) |
Returns the value of a column as a String object.
|
Time |
getTime(int columnIndex) |
Returns the value of a column as a java.sql.Time object using the
default calendar.
|
Time |
getTime(int columnIndex,
Calendar calendar) |
Returns the value of a column as a java.sql.Time object using a
calendar other than the default.
|
Time |
getTime(String columnName) |
Returns the value of a column as a java.sql.Time object using the
default calendar.
|
Time |
getTime(String columnName,
Calendar calendar) |
Returns the value of a column as a java.sql.Time object using a
calendar other than the default.
|
Timestamp |
getTimestamp(int columnIndex) |
Returns the value of a column as a java.sql.Timestamp object
using the default calendar.
|
Timestamp |
getTimestamp(int columnIndex,
Calendar calendar) |
Returns the value of a column as a java.sql.Timestamp object
using a calendar other than the default.
|
Timestamp |
getTimestamp(String columnName) |
Returns the value of a column as a java.sql.Timestamp object
using the default calendar.
|
Timestamp |
getTimestamp(String columnName,
Calendar calendar) |
Returns the value of a column as a java.sql.Timestamp object
using a calendar other than the default.
|
int |
getTransactionIsolation() |
Returns the transaction isolation level.
|
int |
getType() |
Returns the result set type.
|
Map |
getTypeMap() |
Returns the type map.
|
InputStream |
getUnicodeStream(int columnIndex) |
Deprecated.
Use getCharacterStream(int) instead.
|
InputStream |
getUnicodeStream(String columnName) |
Deprecated.
Use getCharacterStream(String) instead.
|
String |
getUrl() |
Returns the url used in getting a connection.
|
URL |
getURL(int columnIndex) |
Returns the value of an SQL DATALINK output parameter as a
java.net.URL object.
|
URL |
getURL(String columnName) |
Returns the value of an SQL DATALINK output parameter as a
java.net.URL object.
|
String |
getUsername() |
Returns the user used to create the connection.
|
protected String[] |
getValidWrappedList() |
|
SQLWarning |
getWarnings() |
Returns the first warning reported for the result set.
|
void |
insertRow() |
Inserts the contents of the insert row into the result set
and the database.
|
boolean |
isAfterLast() |
Indicates if the cursor is positioned after the last row.
|
boolean |
isBeforeFirst() |
Indicates if the cursor is positioned before the first row.
|
boolean |
isClosed() |
Retrieves whether this
ResultSet object has been closed. |
boolean |
isFirst() |
Indicates if the cursor is positioned on the first row.
|
boolean |
isLast() |
Indicates if the cursor is positioned on the last row.
|
boolean |
isReadOnly() |
Indicates if the rowset is read-only.
|
boolean |
isUseDataSource() |
Indicates if the data source is used to make a connection to the database.
|
boolean |
isWrapperFor(Class<?> iface) |
Returns true if this either implements the interface argument or is
directly or indirectly a wrapper for an object that does.
|
boolean |
last() |
Positions the cursor to the last row.
|
void |
moveToCurrentRow() |
Positions the cursor to the current row.
|
void |
moveToInsertRow() |
Positions the cursor to the insert row.
|
boolean |
next() |
Positions the cursor to the next row.
|
boolean |
previous() |
Positions the cursor to the previous row.
|
void |
refreshRow() |
Refreshes the current row from the database and cancels all
pending updates that have been made since the last call to
updateRow().
|
boolean |
relative(int rowNumber) |
Positions the cursor to a relative row number.
|
void |
removePropertyChangeListener(PropertyChangeListener listener) |
Removes a PropertyChangeListener.
|
void |
removeRowSetListener(RowSetListener listener) |
Removes the RowSetListener from the list.
|
boolean |
rowDeleted() |
Indicates if the current row has been deleted.
|
boolean |
rowInserted() |
Indicates if the current row has been inserted.
|
boolean |
rowUpdated() |
Indicates if the current row has been updated.
|
void |
setArray(int parameterIndex,
Array value) |
Sets the array value at the specified parameterIndex.
|
void |
setAsciiStream(int parameterIndex,
InputStream x) |
Sets the designated parameter in this
RowSet object's command
to the given input stream. |
void |
setAsciiStream(int parameterIndex,
InputStream inputStream,
int length) |
Sets the inputStream at the specified parameterIndex.
|
void |
setAsciiStream(String parameterName,
InputStream x) |
Sets the designated parameter to the given input stream.
|
void |
setAsciiStream(String parameterName,
InputStream x,
int length) |
Sets the designated parameter to the given input stream, which will have
the specified number of bytes.
|
void |
setBigDecimal(int parameterIndex,
BigDecimal value) |
Sets the BigDecimal value at the specified parameterIndex.
|
void |
setBigDecimal(String parameterName,
BigDecimal x) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setBinaryStream(int parameterIndex,
InputStream x) |
Sets the designated parameter in this
RowSet object's command
to the given input stream. |
void |
setBinaryStream(int parameterIndex,
InputStream inputStream,
int length) |
Sets the binary stream value using a inputStream at the specified parameterIndex.
|
void |
setBinaryStream(String parameterName,
InputStream x) |
Sets the designated parameter to the given input stream.
|
void |
setBinaryStream(String parameterName,
InputStream x,
int length) |
Sets the designated parameter to the given input stream, which will have
the specified number of bytes.
|
void |
setBlob(int parameterIndex,
InputStream inputStream) |
Sets the designated parameter to a
InputStream object. |
void |
setBlob(int parameterIndex,
InputStream inputStream,
long length) |
Sets the designated parameter to a
InputStream object. |
void |
setBlob(int parameterIndex,
Blob value) |
Sets the Blob value at the specified parameterIndex.
|
void |
setBlob(String parameterName,
InputStream inputStream) |
Sets the designated parameter to a
InputStream object. |
void |
setBlob(String parameterName,
InputStream inputStream,
long length) |
Sets the designated parameter to a
InputStream object. |
void |
setBlob(String parameterName,
Blob x) |
Sets the designated parameter to the given
java.sql.Blob object. |
void |
setBoolean(int parameterIndex,
boolean value) |
Sets the boolean value at the specified parameterIndex.
|
void |
setBoolean(String parameterName,
boolean x) |
Sets the designated parameter to the given Java
boolean value. |
void |
setByte(int parameterIndex,
byte value) |
Sets the byte value at the specified parameterIndex.
|
void |
setByte(String parameterName,
byte x) |
Sets the designated parameter to the given Java
byte value. |
void |
setBytes(int parameterIndex,
byte[] value) |
Sets the byte array value at the specified parameterIndex.
|
void |
setBytes(String parameterName,
byte[] x) |
Sets the designated parameter to the given Java array of bytes.
|
void |
setCharacterStream(int parameterIndex,
Reader reader) |
Sets the designated parameter in this
RowSet object's command
to the given Reader
object. |
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length) |
Sets a column in the current row using a Reader value.
|
void |
setCharacterStream(String parameterName,
Reader reader) |
Sets the designated parameter to the given
Reader
object. |
void |
setCharacterStream(String parameterName,
Reader reader,
int length) |
Sets the designated parameter to the given
Reader
object, which is the given number of characters long. |
void |
setClob(int parameterIndex,
Reader reader) |
Sets the designated parameter to a
Reader object. |
void |
setClob(int parameterIndex,
Reader reader,
long length) |
Sets the designated parameter to a
Reader object. |
void |
setClob(int parameterIndex,
Clob value) |
Sets the Clob value at the specified parameterIndex.
|
void |
setClob(String parameterName,
Reader reader) |
Sets the designated parameter to a
Reader object. |
void |
setClob(String parameterName,
Reader reader,
long length) |
Sets the designated parameter to a
Reader object. |
void |
setClob(String parameterName,
Clob x) |
Sets the designated parameter to the given
java.sql.Clob object. |
void |
setCommand(String command) |
Sets the command used by the execute statement to populate the rowset.
|
void |
setConcurrency(int concurrency) |
Sets the concurrency type for the result set.
|
void |
setContext(Context context) |
Sets the JNDI naming context which provides name-to-object bindings
and methods for retrieving and updating naming and directory services.
|
void |
setDataSourceName(String dataSourceName) |
Sets the name of the data source.
|
void |
setDate(int parameterIndex,
Date value) |
Sets the Date value at the specified parameterIndex.
|
void |
setDate(int parameterIndex,
Date value,
Calendar calendar) |
Sets the Date value at the specified parameterIndex.
|
void |
setDate(String parameterName,
Date x) |
Sets the designated parameter to the given
java.sql.Date value
using the default time zone of the virtual machine that is running
the application. |
void |
setDate(String parameterName,
Date x,
Calendar cal) |
Sets the designated parameter to the given
java.sql.Date value,
using the given Calendar object. |
void |
setDouble(int parameterIndex,
double value) |
Sets the double value at the specified parameterIndex.
|
void |
setDouble(String parameterName,
double x) |
Sets the designated parameter to the given Java
double value. |
void |
setEnvironment(Hashtable environment) |
Sets the standard JNDI environment properties.
|
void |
setEscapeProcessing(boolean enable) |
Sets whether the escape scanning is enabled for escape substitution processing.
|
void |
setFetchDirection(int fetchDirection) |
Sets the direction in which the rows in a result set are
processed.
|
void |
setFetchSize(int fetchSize) |
Sets the number of rows to be fetched from the database when more
rows are needed.
|
void |
setFloat(int parameterIndex,
float value) |
Sets the float value at the specified parameterIndex.
|
void |
setFloat(String parameterName,
float x) |
Sets the designated parameter to the given Java
float value. |
void |
setInt(int parameterIndex,
int value) |
Sets the integer value at the specified parameterIndex.
|
void |
setInt(String parameterName,
int x) |
Sets the designated parameter to the given Java
int value. |
void |
setLong(int parameterIndex,
long value) |
Sets the long value at the specified parameterIndex.
|
void |
setLong(String parameterName,
long x) |
Sets the designated parameter to the given Java
long value. |
void |
setMaxFieldSize(int maxFieldSize) |
Sets the maximum column size.
|
void |
setMaxRows(int maxRows) |
Sets the maximum row limit for the rowset.
|
void |
setNCharacterStream(int parameterIndex,
Reader value) |
Sets the designated parameter in this
RowSet object's command
to a Reader object. |
void |
setNCharacterStream(int parameterIndex,
Reader value,
long length) |
Sets the designated parameter to a
Reader object. |
void |
setNCharacterStream(String parameterName,
Reader value) |
Sets the designated parameter to a
Reader object. |
void |
setNCharacterStream(String parameterName,
Reader value,
long length) |
Sets the designated parameter to a
Reader object. |
void |
setNClob(int parameterIndex,
Reader reader) |
Sets the designated parameter to a
Reader object. |
void |
setNClob(int parameterIndex,
Reader reader,
long length) |
Sets the designated parameter to a
Reader object. |
void |
setNClob(int parameterIndex,
NClob value) |
Sets the designated parameter to a
java.sql.NClob object. |
void |
setNClob(String parameterName,
Reader reader) |
Sets the designated parameter to a
Reader object. |
void |
setNClob(String parameterName,
Reader reader,
long length) |
Sets the designated parameter to a
Reader object. |
void |
setNClob(String parameterName,
NClob value) |
Sets the designated parameter to a
java.sql.NClob object. |
void |
setNString(int parameterIndex,
String value) |
Sets the designated parameter to the given
String object. |
void |
setNString(String parameterName,
String value) |
Sets the designated parameter to the given
String object. |
void |
setNull(int parameterIndex,
int sqlType) |
Sets the type at the specified parameterIndex to SQL NULL.
|
void |
setNull(int parameterIndex,
int sqlType,
String typeName) |
Sets the user-named type or REF type at the specified parameterIndex to SQL NULL.
|
void |
setNull(String parameterName,
int sqlType) |
Sets the designated parameter to SQL
NULL . |
void |
setNull(String parameterName,
int sqlType,
String typeName) |
Sets the designated parameter to SQL
NULL . |
void |
setObject(int parameterIndex,
Object value) |
Sets the object value at the specified parameterIndex.
|
void |
setObject(int parameterIndex,
Object value,
int targetSqlType) |
Sets the object value at the specified parameterIndex.
|
void |
setObject(int parameterIndex,
Object value,
int targetSqlType,
int scale) |
Sets the object value at the specified parameterIndex.
|
void |
setObject(String parameterName,
Object x) |
Sets the value of the designated parameter with the given object.
|
void |
setObject(String parameterName,
Object x,
int targetSqlType) |
Sets the value of the designated parameter with the given object.
|
void |
setObject(String parameterName,
Object x,
int targetSqlType,
int scale) |
Sets the value of the designated parameter with the given object.
|
void |
setPassword(char[] password) |
Sets the password used to make the connection.
|
void |
setPassword(String password) |
Sets the password used to make the connection.
|
void |
setQueryTimeout(int timeout) |
Sets the maximum wait time in seconds for a statement to execute.
|
void |
setReadOnly(boolean readOnly) |
Sets whether the rowset is read-only.
|
void |
setRef(int parameterIndex,
Ref value) |
Sets Ref value at the specified parameterIndex.
|
void |
setRowId(int parameterIndex,
RowId x) |
Sets the designated parameter to the given
java.sql.RowId object. |
void |
setRowId(String parameterName,
RowId x) |
Sets the designated parameter to the given
java.sql.RowId object. |
void |
setShort(int parameterIndex,
short value) |
Sets the short value at the specified parameterIndex.
|
void |
setShort(String parameterName,
short x) |
Sets the designated parameter to the given Java
short value. |
void |
setSQLXML(int parameterIndex,
SQLXML xmlObject) |
Sets the designated parameter to the given
java.sql.SQLXML object. |
void |
setSQLXML(String parameterName,
SQLXML xmlObject) |
Sets the designated parameter to the given
java.sql.SQLXML object. |
void |
setString(int parameterIndex,
String value) |
Sets the string value at the specified parameterIndex.
|
void |
setString(String parameterName,
String x) |
Sets the designated parameter to the given Java
String value. |
void |
setTime(int parameterIndex,
Time value) |
Sets the time value at the specified parameterIndex.
|
void |
setTime(int parameterIndex,
Time value,
Calendar calendar) |
Sets the time value at the specified parameterIndex.
|
void |
setTime(String parameterName,
Time x) |
Sets the designated parameter to the given
java.sql.Time value. |
void |
setTime(String parameterName,
Time x,
Calendar cal) |
Sets the designated parameter to the given
java.sql.Time value,
using the given Calendar object. |
void |
setTimestamp(int parameterIndex,
Timestamp value) |
Sets the timestamp value at the specified parameterIndex.
|
void |
setTimestamp(int parameterIndex,
Timestamp value,
Calendar calendar) |
Sets the timestamp value at the specified parameterIndex.
|
void |
setTimestamp(String parameterName,
Timestamp x) |
Sets the designated parameter to the given
java.sql.Timestamp value. |
void |
setTimestamp(String parameterName,
Timestamp x,
Calendar cal) |
Sets the designated parameter to the given
java.sql.Timestamp value,
using the given Calendar object. |
void |
setTransactionIsolation(int level) |
Sets the transaction isolation level.
|
void |
setType(int type) |
Sets the result set type.
|
void |
setTypeMap(Map map) |
Sets the type map to be used for distinct and structured types.
|
void |
setUrl(String url) |
Sets the URL used for getting a connection.
|
void |
setURL(int parameterIndex,
URL x) |
Sets the designated parameter to the given
java.net.URL value. |
void |
setUseDataSource(boolean useDataSource) |
Sets whether the data source is used to make a connection to the database.
|
void |
setUsername(String username) |
Sets the user name used to make the connection.
|
String |
toString() |
Returns the name of the SQL cursor in use by the result set.
|
<T> T |
unwrap(Class<T> iface) |
Returns an object that implements the given interface to allow access to
non-standard methods, or standard methods not exposed by the proxy.
|
void |
updateArray(int columnIndex,
Array columnValue) |
Updates a column in the current row using an Array value.
|
void |
updateArray(String columnName,
Array columnValue) |
Updates a column in the current row using an Array value.
|
void |
updateAsciiStream(int columnIndex,
InputStream x) |
Updates the designated column with an ascii stream value.
|
void |
updateAsciiStream(int columnIndex,
InputStream columnValue,
int length) |
Updates a column in the current row using an ASCII stream value.
|
void |
updateAsciiStream(int columnIndex,
InputStream x,
long length) |
Updates the designated column with an ascii stream value, which will have
the specified number of bytes.
|
void |
updateAsciiStream(String columnLabel,
InputStream x) |
Updates the designated column with an ascii stream value.
|
void |
updateAsciiStream(String columnName,
InputStream columnValue,
int length) |
Updates a column in the current row using an ASCII stream value.
|
void |
updateAsciiStream(String columnLabel,
InputStream x,
long length) |
Updates the designated column with an ascii stream value, which will have
the specified number of bytes..
|
void |
updateBigDecimal(int columnIndex,
BigDecimal columnValue) |
Updates a column in the current row using a BigDecimal value.
|
void |
updateBigDecimal(String columnName,
BigDecimal columnValue) |
Updates a column in the current row using a BigDecimal value.
|
void |
updateBinaryStream(int columnIndex,
InputStream x) |
Updates the designated column with a binary stream value.
|
void |
updateBinaryStream(int columnIndex,
InputStream columnValue,
int length) |
Updates a column in the current row using a binary stream value.
|
void |
updateBinaryStream(int columnIndex,
InputStream x,
long length) |
Updates the designated column with a binary stream value, which will have
the specified number of bytes.
|
void |
updateBinaryStream(String columnLabel,
InputStream x) |
Updates the designated column with a binary stream value.
|
void |
updateBinaryStream(String columnName,
InputStream columnValue,
int length) |
Updates a column in the current row using a binary stream value.
|
void |
updateBinaryStream(String columnLabel,
InputStream x,
long length) |
Updates the designated column with a binary stream value, which will have
the specified number of bytes.
|
void |
updateBlob(int columnIndex,
InputStream inputStream) |
Updates the designated column using the given input stream.
|
void |
updateBlob(int columnIndex,
InputStream inputStream,
long length) |
Updates the designated column using the given input stream, which
will have the specified number of bytes.
|
void |
updateBlob(int columnIndex,
Blob columnValue) |
Updates a column in the current row using a Java Blob value.
|
void |
updateBlob(String columnLabel,
InputStream inputStream) |
Updates the designated column using the given input stream.
|
void |
updateBlob(String columnLabel,
InputStream inputStream,
long length) |
Updates the designated column using the given input stream, which
will have the specified number of bytes.
|
void |
updateBlob(String columnName,
Blob columnValue) |
Updates a column in the current row using a Java Blob value.
|
void |
updateBoolean(int columnIndex,
boolean columnValue) |
Updates a column in the current row using a Java boolean value.
|
void |
updateBoolean(String columnName,
boolean columnValue) |
Updates a column in the current row using a Java boolean value.
|
void |
updateByte(int columnIndex,
byte columnValue) |
Updates a column in the current row using a Java byte value.
|
void |
updateByte(String columnName,
byte columnValue) |
Updates a column in the current row using a Java byte value.
|
void |
updateBytes(int columnIndex,
byte[] columnValue) |
Updates a column in the current row using a Java byte array value.
|
void |
updateBytes(String columnName,
byte[] columnValue) |
Updates a column in the current row using a Java byte array value.
|
void |
updateCharacterStream(int columnIndex,
Reader x) |
Updates the designated column with a character stream value.
|
void |
updateCharacterStream(int columnIndex,
Reader columnValue,
int length) |
Updates a column in the current row using a Reader value.
|
void |
updateCharacterStream(int columnIndex,
Reader x,
long length) |
Updates the designated column with a character stream value, which will have
the specified number of bytes.
|
void |
updateCharacterStream(String columnLabel,
Reader reader) |
Updates the designated column with a character stream value.
|
void |
updateCharacterStream(String columnName,
Reader columnValue,
int length) |
Updates a column in the current row using a Reader value.
|
void |
updateCharacterStream(String columnLabel,
Reader reader,
long length) |
Updates the designated column with a character stream value, which will have
the specified number of bytes.
|
void |
updateClob(int columnIndex,
Reader reader) |
Updates the designated column using the given
Reader
object. |
void |
updateClob(int columnIndex,
Reader reader,
long length) |
Updates the designated column using the given
Reader
object, which is the given number of characters long. |
void |
updateClob(int columnIndex,
Clob columnValue) |
Updates a column in the current row using a Java Clob value.
|
void |
updateClob(String columnLabel,
Reader reader) |
Updates the designated column using the given
Reader
object. |
void |
updateClob(String columnLabel,
Reader reader,
long length) |
Updates the designated column using the given
Reader
object, which is the given number of characters long. |
void |
updateClob(String columnName,
Clob columnValue) |
Updates a column in the current row using a Java Clob value.
|
void |
updateDate(int columnIndex,
Date columnValue) |
Updates a column in the current row using a java.sql.Date value.
|
void |
updateDate(String columnName,
Date columnValue) |
Updates a column in the current row using a java.sql.Date value.
|
void |
updateDouble(int columnIndex,
double columnValue) |
Updates a column in the current row using a Java double value.
|
void |
updateDouble(String columnName,
double columnValue) |
Updates a column in the current row using a Java double value.
|
void |
updateFloat(int columnIndex,
float columnValue) |
Updates a column in the current row using a Java float value.
|
void |
updateFloat(String columnName,
float columnValue) |
Updates a column in the current row using a Java float value.
|
void |
updateInt(int columnIndex,
int columnValue) |
Updates a column in the current row using a Java int value.
|
void |
updateInt(String columnName,
int columnValue) |
Updates a column in the current row using a Java int value.
|
void |
updateLong(int columnIndex,
long columnValue) |
Updates a column in the current row using a Java long value.
|
void |
updateLong(String columnName,
long columnValue) |
Updates a column in the current row using a Java long value.
|
void |
updateNCharacterStream(int columnIndex,
Reader x) |
Updates the designated column with a character stream value.
|
void |
updateNCharacterStream(int columnIndex,
Reader x,
long length) |
Updates the designated column with a character stream value, which will have
the specified number of bytes.
|
void |
updateNCharacterStream(String columnLabel,
Reader reader) |
Updates the designated column with a character stream value.
|
void |
updateNCharacterStream(String columnLabel,
Reader reader,
long length) |
Updates the designated column with a character stream value, which will have
the specified number of bytes.
|
void |
updateNClob(int columnIndex,
Reader reader) |
Updates the designated column using the given
Reader
The data will be read from the stream
as needed until end-of-stream is reached. |
void |
updateNClob(int columnIndex,
Reader reader,
long length) |
Updates the designated column using the given
Reader
object, which is the given number of characters long. |
void |
updateNClob(int columnIndex,
NClob nClob) |
Updates the designated column with a
java.sql.NClob value. |
void |
updateNClob(String columnLabel,
Reader reader) |
Updates the designated column using the given
Reader
object. |
void |
updateNClob(String columnLabel,
Reader reader,
long length) |
Updates the designated column using the given
Reader
object, which is the given number of characters long. |
void |
updateNClob(String columnLabel,
NClob nClob) |
Updates the designated column with a
java.sql.NClob value. |
void |
updateNString(int columnIndex,
String nString) |
Updates the designated column with a
String value. |
void |
updateNString(String columnLabel,
String nString) |
Updates the designated column with a
String value. |
void |
updateNull(int columnIndex) |
Updates a column in the current row using SQL NULL.
|
void |
updateNull(String columnName) |
Updates a column in the current row using SQL NULL.
|
void |
updateObject(int columnIndex,
Object columnValue) |
Updates a column in the current row using an Object value.
|
void |
updateObject(int columnIndex,
Object columnValue,
int scale) |
Updates a column in the current row using an Object value.
|
void |
updateObject(String columnName,
Object columnValue) |
Updates a column in the current row using an Object value.
|
void |
updateObject(String columnName,
Object columnValue,
int scale) |
Updates a column in the current row using an Object value.
|
void |
updateRef(int columnIndex,
Ref columnValue) |
Updates a column in the current row using an Ref value.
|
void |
updateRef(String columnName,
Ref columnValue) |
Updates a column in the current row using an Ref value.
|
void |
updateRow() |
Updates the database with the new contents of the current row.
|
void |
updateRowId(int columnIndex,
RowId x) |
Updates the designated column with a
RowId value. |
void |
updateRowId(String columnLabel,
RowId x) |
Updates the designated column with a
RowId value. |
void |
updateShort(int columnIndex,
short columnValue) |
Updates a column in the current row using a Java short value.
|
void |
updateShort(String columnName,
short columnValue) |
Updates a column in the current row using a Java short value.
|
void |
updateSQLXML(int columnIndex,
SQLXML xmlObject) |
Updates the designated column with a
java.sql.SQLXML value. |
void |
updateSQLXML(String columnLabel,
SQLXML xmlObject) |
Updates the designated column with a
java.sql.SQLXML value. |
void |
updateString(int columnIndex,
String columnValue) |
Updates a column in the current row using a String value.
|
void |
updateString(String columnName,
String columnValue) |
Updates a column in the current row using a String value.
|
void |
updateTime(int columnIndex,
Time columnValue) |
Updates a column in the current row using a java.sql.Time value.
|
void |
updateTime(String columnName,
Time columnValue) |
Updates a column in the current row using a java.sql.Time value.
|
void |
updateTimestamp(int columnIndex,
Timestamp columnValue) |
Updates a column in the current row using a java.sql.Timestamp value.
|
void |
updateTimestamp(String columnName,
Timestamp columnValue) |
Updates a column in the current row using a java.sql.Timestamp value.
|
boolean |
wasNull() |
Indicates if the last column read has the value of SQL NULL.
|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
updateObject, updateObject, updateObject, updateObject
isWrapperFor, unwrap
public AS400JDBCRowSet()
public AS400JDBCRowSet(String dataSourceName)
dataSourceName
- The name of the data source used to make the connection.public AS400JDBCRowSet(String url, String username, String password)
url
- The url used to make the connection.username
- The user name.password
- The password.public boolean absolute(int rowNumber) throws SQLException
Attempting to move beyond the first row positions the cursor before the first row. Attempting to move beyond the last row positions the cursor after the last row.
If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.
absolute
in interface ResultSet
rowNumber
- The absolute row number (1-based). If the absolute row
number is positive, this positions the cursor
with respect to the beginning of the result set.
If the absolute row number is negative, this
positions the cursor with respect to the end
of result set.SQLException
- If the result set is not open,
the result set is not scrollable,
the row number is 0,
or an error occurs.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void addRowSetListener(RowSetListener listener)
addRowSetListener
in interface RowSet
listener
- The RowSetListener object.public void afterLast() throws SQLException
afterLast
in interface ResultSet
SQLException
- If the result set is not open, the result set is not scrollable, or an error occurs.public void beforeFirst() throws SQLException
beforeFirst
in interface ResultSet
SQLException
- If the result set is not open, the result set is not scrollable, or an error occurs.public void cancelRowUpdates() throws SQLException
cancelRowUpdates
in interface ResultSet
SQLException
- If the result set is not open
or the result set is not updatable.public void clearParameters() throws SQLException
clearParameters
in interface RowSet
SQLException
- If a database error occurs.public void clearWarnings() throws SQLException
clearWarnings
in interface ResultSet
SQLException
- If an error occurs.public void close() throws SQLException
close
in interface AutoCloseable
close
in interface ResultSet
SQLException
- If an error occurs.public void deleteRow() throws SQLException
deleteRow
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the cursor is positioned on the insert row,
or an error occurs.public void execute() throws SQLException
execute
in interface RowSet
SQLException
- If a database error occurs.protected void finalize() throws SQLException
finalize
in class Object
SQLException
- If a database error occurs.public int findColumn(String columnName) throws SQLException
findColumn
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open
or the column name is not found.public boolean first() throws SQLException
first
in interface ResultSet
SQLException
- If the result set is not open, the result set is not scrollable, or an error occurs.public Array getArray(int columnIndex) throws SQLException
getArray
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- Always thrown because DB2 for IBM i does not support arrays.public Array getArray(String columnName) throws SQLException
getArray
in interface ResultSet
columnName
- The column name.SQLException
- Always thrown because DB2 for IBM i does not support arrays.public InputStream getAsciiStream(int columnIndex) throws SQLException
getAsciiStream
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
or the requested conversion is not valid.public InputStream getAsciiStream(String columnName) throws SQLException
getAsciiStream
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public BigDecimal getBigDecimal(int columnIndex) throws SQLException
getBigDecimal
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
or the requested conversion is not valid.public BigDecimal getBigDecimal(String columnName) throws SQLException
getBigDecimal
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found,
or the requested conversion is not valid.public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
getBigDecimal
in interface ResultSet
columnIndex
- The column index (1-based).scale
- The number of digits after the decimal.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
the scale is not valid, or the
requested conversion is not valid.getBigDecimal(int)
public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
getBigDecimal
in interface ResultSet
columnName
- The column name.scale
- The number of digits after the decimal.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found,
the scale is not valid, or the
requested conversion is not valid.getBigDecimal(String)
public InputStream getBinaryStream(int columnIndex) throws SQLException
getBinaryStream
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public InputStream getBinaryStream(String columnName) throws SQLException
getBinaryStream
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Blob getBlob(int columnIndex) throws SQLException
getBlob
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Blob getBlob(String columnName) throws SQLException
getBlob
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public boolean getBoolean(int columnIndex) throws SQLException
getBoolean
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public boolean getBoolean(String columnName) throws SQLException
getBoolean
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public byte getByte(int columnIndex) throws SQLException
getByte
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public byte getByte(String columnName) throws SQLException
getByte
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public byte[] getBytes(int columnIndex) throws SQLException
This can also be used to get values from columns with other types. The values are returned in their native IBM i format. This is not supported for result sets returned by a DatabaseMetaData object.
getBytes
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public byte[] getBytes(String columnName) throws SQLException
This can also be used to get values from columns with other types. The values are returned in their native IBM i format. This is not supported for result sets returned by a DatabaseMetaData object.
getBytes
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Reader getCharacterStream(int columnIndex) throws SQLException
getCharacterStream
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Reader getCharacterStream(String columnName) throws SQLException
getCharacterStream
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not valid, or the
requested conversion is not valid.public Clob getClob(int columnIndex) throws SQLException
getClob
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Clob getClob(String columnName) throws SQLException
getClob
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public String getCommand()
getCommand
in interface RowSet
public int getConcurrency() throws SQLException
getConcurrency
in interface ResultSet
SQLException
- If the result set is not open.public Context getContext()
public String getCursorName() throws SQLException
getCursorName
in interface ResultSet
SQLException
- If the result is not open.public String getDataSourceName()
getDataSourceName
in interface RowSet
public Date getDate(int columnIndex) throws SQLException
getDate
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Date getDate(String columnName) throws SQLException
getDate
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Date getDate(int columnIndex, Calendar calendar) throws SQLException
getDate
in interface ResultSet
columnIndex
- The column index (1-based).calendar
- The calendar.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
the calendar is null, or the
requested conversion is not valid.public Date getDate(String columnName, Calendar calendar) throws SQLException
getDate
in interface ResultSet
columnName
- The column name.calendar
- The calendar.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found,
the calendar is null, or the
requested conversion is not valid.public double getDouble(int columnIndex) throws SQLException
getDouble
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public double getDouble(String columnName) throws SQLException
getDouble
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Hashtable getEnvironment()
public boolean getEscapeProcessing()
getEscapeProcessing
in interface RowSet
public int getFetchDirection() throws SQLException
getFetchDirection
in interface ResultSet
SQLException
- If the result is not open.public int getFetchSize() throws SQLException
getFetchSize
in interface ResultSet
SQLException
- If the result is not open.public float getFloat(int columnIndex) throws SQLException
getFloat
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public float getFloat(String columnName) throws SQLException
getFloat
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public int getInt(int columnIndex) throws SQLException
getInt
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public int getInt(String columnName) throws SQLException
getInt
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public long getLong(int columnIndex) throws SQLException
getLong
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public long getLong(String columnName) throws SQLException
getLong
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public int getMaxFieldSize() throws SQLException
getMaxFieldSize
in interface RowSet
SQLException
- If a database error occurs.public int getMaxRows() throws SQLException
getMaxRows
in interface RowSet
SQLException
- If a database error occurs.public ResultSetMetaData getMetaData() throws SQLException
getMetaData
in interface ResultSet
SQLException
- If an error occurs.public Object getObject(int columnIndex) throws SQLException
getObject
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Object getObject(String columnName) throws SQLException
getObject
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Object getObject(int columnIndex, Map typeMap) throws SQLException
getObject
in interface ResultSet
columnIndex
- The column index (1-based).typeMap
- The type map. This is not used.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
the type map is null, or the
requested conversion is not valid.public Object getObject(String columnName, Map typeMap) throws SQLException
getObject
in interface ResultSet
columnName
- The column name.typeMap
- The type map. This is not used.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found,
the type map is null, or the
requested conversion is not valid.public String getPassword()
getPassword
in interface RowSet
public int getQueryTimeout() throws SQLException
getQueryTimeout
in interface RowSet
SQLException
- If a database error occurs.public Ref getRef(int columnIndex) throws SQLException
getRef
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- Always thrown because DB2 for IBM i does not support structured types.public Ref getRef(String columnName) throws SQLException
getRef
in interface ResultSet
columnName
- The column name.SQLException
- Always thrown because DB2 for IBM i does not support structured types.public int getRow() throws SQLException
getRow
in interface ResultSet
SQLException
- If the result set is not open.public short getShort(int columnIndex) throws SQLException
getShort
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public short getShort(String columnName) throws SQLException
getShort
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Statement getStatement() throws SQLException
getStatement
in interface ResultSet
SQLException
- If an error occurs.public String getString(int columnIndex) throws SQLException
getString
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public String getString(String columnName) throws SQLException
getString
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Time getTime(int columnIndex) throws SQLException
getTime
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Time getTime(String columnName) throws SQLException
getTime
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Time getTime(int columnIndex, Calendar calendar) throws SQLException
getTime
in interface ResultSet
columnIndex
- The column index (1-based).calendar
- The calendar.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
the calendar is null, or the
requested conversion is not valid.public Time getTime(String columnName, Calendar calendar) throws SQLException
getTime
in interface ResultSet
columnName
- The column name.calendar
- The calendar.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found,
the calendar is null, or the
requested conversion is not valid.public Timestamp getTimestamp(int columnIndex) throws SQLException
getTimestamp
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public Timestamp getTimestamp(String columnName) throws SQLException
getTimestamp
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public Timestamp getTimestamp(int columnIndex, Calendar calendar) throws SQLException
getTimestamp
in interface ResultSet
columnIndex
- The column index (1-based).calendar
- The calendar.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid,
the calendar is null, or the
requested conversion is not valid.public Timestamp getTimestamp(String columnName, Calendar calendar) throws SQLException
getTimestamp
in interface ResultSet
columnName
- The column name.calendar
- The calendar.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found,
the calendar is null, or the
requested conversion is not valid.public int getTransactionIsolation()
getTransactionIsolation
in interface RowSet
public int getType() throws SQLException
getType
in interface ResultSet
SQLException
- If the result set is not open.public Map getTypeMap() throws SQLException
getTypeMap
in interface RowSet
SQLException
- If a database error occurs.public InputStream getUnicodeStream(int columnIndex) throws SQLException
getUnicodeStream
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.getCharacterStream(int)
public InputStream getUnicodeStream(String columnName) throws SQLException
getUnicodeStream
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.getCharacterStream(String)
public String getUrl()
public URL getURL(int columnIndex) throws SQLException
getURL
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed or
the requested conversion is not valid.public URL getURL(String columnName) throws SQLException
getURL
in interface ResultSet
columnName
- The column name.SQLException
- If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed or
the requested conversion is not valid.public String getUsername()
getUsername
in interface RowSet
public SQLWarning getWarnings() throws SQLException
getWarnings
in interface ResultSet
SQLException
- If an error occurs.public void insertRow() throws SQLException
insertRow
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on the insert row,
a column that is not nullable was not specified,
or an error occurs.public boolean isAfterLast() throws SQLException
isAfterLast
in interface ResultSet
SQLException
- If the result set is not open.public boolean isBeforeFirst() throws SQLException
isBeforeFirst
in interface ResultSet
SQLException
- If the result set is not open.public boolean isFirst() throws SQLException
isFirst
in interface ResultSet
SQLException
- If the result set is not open.public boolean isLast() throws SQLException
isLast
in interface ResultSet
SQLException
- If the result set is not open.public boolean isReadOnly()
isReadOnly
in interface RowSet
public boolean isUseDataSource()
public boolean last() throws SQLException
last
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void moveToCurrentRow() throws SQLException
If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.
moveToCurrentRow
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void moveToInsertRow() throws SQLException
moveToInsertRow
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not scrollable,
the result set is not updatable,
or an error occurs.public boolean next() throws SQLException
next
in interface ResultSet
SQLException
- If the result set is not open,
or an error occurs.public boolean previous() throws SQLException
previous
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void refreshRow() throws SQLException
refreshRow
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not scrollable,
the cursor is not positioned on a row,
the cursor is positioned on the
insert row or an error occurs.public boolean relative(int rowNumber) throws SQLException
Attempting to move beyond the first row positions the cursor before the first row. Attempting to move beyond the last row positions the cursor after the last row.
If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.
relative
in interface ResultSet
rowNumber
- The relative row number. If the relative row
number is positive, this positions the cursor
after the current position. If the relative
row number is negative, this positions the
cursor before the current position. If the
relative row number is 0, then the cursor
position does not change.SQLException
- If the result set is not open,
the result set is not scrollable,
the cursor is not positioned on a valid row,
or an error occurs.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removeRowSetListener(RowSetListener listener)
removeRowSetListener
in interface RowSet
listener
- The RowSetListener object.public boolean rowDeleted() throws SQLException
rowDeleted
in interface ResultSet
SQLException
- If an error occurs.public boolean rowInserted() throws SQLException
rowInserted
in interface ResultSet
SQLException
- If an error occurs.public boolean rowUpdated() throws SQLException
rowUpdated
in interface ResultSet
SQLException
- If an error occurs.public void setArray(int parameterIndex, Array value) throws SQLException
setArray
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Array object.SQLException
- If a database error occurs.public void setAsciiStream(int parameterIndex, InputStream inputStream, int length) throws SQLException
setAsciiStream
in interface RowSet
parameterIndex
- The parameter index (1-based).inputStream
- The input stream or null to update the value to SQL NULL.length
- The number of bytes in the stream.SQLException
- If the result set is not open, the result set is not updatable,
the cursor is not positioned on a row, the column index is not valid, or the requested
conversion is not valid, the length is not valid, or an error happens while reading the
input stream.public void setBigDecimal(int parameterIndex, BigDecimal value) throws SQLException
setBigDecimal
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The BigDecimal object.SQLException
- If a database error occurs.public void setBinaryStream(int parameterIndex, InputStream inputStream, int length) throws SQLException
setBinaryStream
in interface RowSet
parameterIndex
- The parameter index (1-based).inputStream
- The input stream or null to update the value to SQL NULL.length
- The number of bytes in the stream.SQLException
- If the result set is not open, the result set is not updatable,
the cursor is not positioned on a row, the column index is not valid, or the requested
conversion is not valid, the length is not valid, or an error happens while reading the
input stream.public void setBlob(int parameterIndex, Blob value) throws SQLException
setBlob
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Blob object.SQLException
- If a database error occurs.public void setBoolean(int parameterIndex, boolean value) throws SQLException
setBoolean
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The boolean value.SQLException
- If a database error occurs.public void setByte(int parameterIndex, byte value) throws SQLException
setByte
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The byte value.SQLException
- If a database error occurs.public void setBytes(int parameterIndex, byte[] value) throws SQLException
setBytes
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The byte array.SQLException
- If a database error occurs.public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
setCharacterStream
in interface RowSet
parameterIndex
- The parameter index (1-based).reader
- The reader or null to update the value to SQL NULL.length
- The number of characters in the stream.SQLException
- If the result set is not open, the result set is not updatable,
the cursor is not positioned on a row, the column index is not valid,
or the requested conversion is not valid, the length is not valid, or
an error happens while reading the input stream.public void setClob(int parameterIndex, Clob value) throws SQLException
setClob
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Clob object.SQLException
- If a database error occurs.public void setCommand(String command) throws SQLException
setCommand
in interface RowSet
command
- The command.SQLException
- If a database error occurs.public void setConcurrency(int concurrency)
setConcurrency
in interface RowSet
concurrency
- The concurrency type.public void setContext(Context context)
context
- A JNDI naming context.public void setDataSourceName(String dataSourceName)
setDataSourceName
in interface RowSet
dataSourceName
- The data source name.public void setDate(int parameterIndex, Date value) throws SQLException
setDate
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Date object.SQLException
- If a database error occurs.public void setDate(int parameterIndex, Date value, Calendar calendar) throws SQLException
setDate
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Date object.calendar
- The Calendar object.SQLException
- If a database error occurs.public void setDouble(int parameterIndex, double value) throws SQLException
setDouble
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The double value.SQLException
- If a database error occurs.public void setEnvironment(Hashtable environment)
environment
- A Hashtable of JNDI environment properties.public void setEscapeProcessing(boolean enable) throws SQLException
setEscapeProcessing
in interface RowSet
enable
- true if enabled; false otherwise. The default value is true.SQLException
- If a database error occurs.public void setFetchDirection(int fetchDirection) throws SQLException
setFetchDirection
in interface ResultSet
fetchDirection
- The fetch direction for processing rows.
Valid values are:
SQLException
- If the result set is not open, the result set is scrollable
and the input value is not ResultSet.FETCH_FORWARD,
or the input value is not valid.public void setFetchSize(int fetchSize) throws SQLException
This setting only affects statements that meet the criteria specified in the "block criteria" property. The fetch size is only used if the "block size" property is set to "0".
setFetchSize
in interface ResultSet
fetchSize
- The number of rows. This must be greater than
or equal to 0 and less than or equal to the
maximum rows limit. The default is the
statement's fetch size.SQLException
- If the result set is not open
or the input value is not valid.public void setFloat(int parameterIndex, float value) throws SQLException
setFloat
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The float value.SQLException
- If a database error occurs.public void setInt(int parameterIndex, int value) throws SQLException
setInt
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The integer value.SQLException
- If a database error occurs.public void setLong(int parameterIndex, long value) throws SQLException
setLong
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The long value.SQLException
- If a database error occurs.public void setMaxFieldSize(int maxFieldSize) throws SQLException
setMaxFieldSize
in interface RowSet
maxFieldSize
- The maximum column size.SQLException
- If a database error occurs.public void setMaxRows(int maxRows) throws SQLException
setMaxRows
in interface RowSet
maxRows
- The maximum number of rows.SQLException
- If a database error occurs.public void setNull(int parameterIndex, int sqlType) throws SQLException
setNull
in interface RowSet
parameterIndex
- The parameter index (1-based).sqlType
- The SQL type.SQLException
- If a database error occurs.public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException
setNull
in interface RowSet
parameterIndex
- The parameter index (1-based).sqlType
- The SQL type.typeName
- The fully qualified name of an SQL user-named type. This parameter is not used if the type is REF.SQLException
- If a database error occurs.public void setObject(int parameterIndex, Object value) throws SQLException
setObject
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Object value.SQLException
- If a database error occurs.public void setObject(int parameterIndex, Object value, int targetSqlType) throws SQLException
setObject
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Object value.targetSqlType
- The SQL type.SQLException
- If a database error occurs.public void setObject(int parameterIndex, Object value, int targetSqlType, int scale) throws SQLException
setObject
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Object value.targetSqlType
- The SQL type.scale
- The number of digits after the decimal point. This parameter is used only for SQL types Decimal or Numeric.SQLException
- If a database error occurs.public void setPassword(String password)
setPassword
in interface RowSet
password
- The password.public void setPassword(char[] password)
password
- The password.public void setQueryTimeout(int timeout) throws SQLException
setQueryTimeout
in interface RowSet
timeout
- The timeout value in seconds. The default value is zero indicating no maximum value.SQLException
- If a database error occurs.public void setReadOnly(boolean readOnly) throws SQLException
setReadOnly
in interface RowSet
readOnly
- true if read-only; false otherwise.SQLException
- If a database error occurs.public void setRef(int parameterIndex, Ref value) throws SQLException
setRef
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Ref object.SQLException
- If a database error occurs.public void setShort(int parameterIndex, short value) throws SQLException
setShort
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The short value.SQLException
- If a database error occurs.public void setString(int parameterIndex, String value) throws SQLException
setString
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The String object.SQLException
- If a database error occurs.public void setTime(int parameterIndex, Time value) throws SQLException
setTime
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Time object.SQLException
- If a database error occurs.public void setTime(int parameterIndex, Time value, Calendar calendar) throws SQLException
setTime
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Time object.calendar
- The Calendar object.SQLException
- If a database error occurs.public void setTimestamp(int parameterIndex, Timestamp value) throws SQLException
setTimestamp
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Timestamp object.SQLException
- If a database error occurs.public void setTimestamp(int parameterIndex, Timestamp value, Calendar calendar) throws SQLException
setTimestamp
in interface RowSet
parameterIndex
- The parameter index (1-based).value
- The Timestamp object.calendar
- The Calendar object.SQLException
- If a database error occurs.public void setTransactionIsolation(int level) throws SQLException
setTransactionIsolation
in interface RowSet
level
- The transaction isolation level.
Possible values are:
SQLException
- If a database error occurs.public void setType(int type) throws SQLException
setType
in interface RowSet
type
- The type.SQLException
- If a database error occurs.public void setTypeMap(Map map) throws SQLException
setTypeMap
in interface RowSet
map
- The type map.SQLException
- If a database error occurs.public void setUrl(String url)
setUrl
in interface RowSet
url
- The URL.setUseDataSource(boolean)
public void setUseDataSource(boolean useDataSource)
useDataSource
- true if the data source is used; false if the URL is used.
The default value is true.public void setUsername(String username)
setUsername
in interface RowSet
username
- The user name.public String toString()
public void updateArray(int columnIndex, Array columnValue) throws SQLException
updateArray
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null if the value is SQL NULL.SQLException
- Always thrown because DB2 for IBM i does not support arrays.public void updateArray(String columnName, Array columnValue) throws SQLException
updateArray
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null if the value is SQL NULL.SQLException
- Always thrown because DB2 for IBM i does not support arrays.public void updateAsciiStream(int columnIndex, InputStream columnValue, int length) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateAsciiStream
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update the value to SQL NULL.length
- The length.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, the
requested conversion is not valid,
the length is not
valid, the input stream does not contain
ASCII characters, or an error happens
while reading the input stream.public void updateAsciiStream(String columnName, InputStream columnValue, int length) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateAsciiStream
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update the value to SQL NULL.length
- The length.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, the
requested conversion is not valid,
the length is not valid,
the input stream does not contain
ASCII characters, or an error happens
while reading the input stream.public void updateBigDecimal(int columnIndex, BigDecimal columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBigDecimal
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateBigDecimal(String columnName, BigDecimal columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBigDecimal
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateBinaryStream(int columnIndex, InputStream columnValue, int length) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBinaryStream
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update the value to SQL NULL.length
- The length.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid,
the length is not valid, or an error
happens while reading the input stream.public void updateBinaryStream(String columnName, InputStream columnValue, int length) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBinaryStream
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid,
the length is not valid, or an error
happens while reading the input stream.public void updateBlob(int columnIndex, Blob columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBlob
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateBlob(String columnName, Blob columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBlob
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateBoolean(int columnIndex, boolean columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBoolean
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateBoolean(String columnName, boolean columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBoolean
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateByte(int columnIndex, byte columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateByte
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateByte(String columnName, byte columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateByte
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateBytes(int columnIndex, byte[] columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBytes
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateBytes(String columnName, byte[] columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateBytes
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateCharacterStream(int columnIndex, Reader columnValue, int length) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateCharacterStream
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid,
the length is not valid, or an error
happens while reading the input stream.public void updateCharacterStream(String columnName, Reader columnValue, int length) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateCharacterStream
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid,
the length is not valid, or an error
happens while reading the input stream.public void updateClob(int columnIndex, Clob columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateClob
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateClob(String columnName, Clob columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateClob
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateDate(int columnIndex, Date columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateDate
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateDate(String columnName, Date columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateDate
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateDouble(int columnIndex, double columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateDouble
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateDouble(String columnName, double columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateDouble
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateFloat(int columnIndex, float columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateFloat
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateFloat(String columnName, float columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateFloat
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateInt(int columnIndex, int columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateInt
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateInt(String columnName, int columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateInt
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateLong(int columnIndex, long columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateLong
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateLong(String columnName, long columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateLong
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateNull(int columnIndex) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateNull
in interface ResultSet
columnIndex
- The column index (1-based).SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateNull(String columnName) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateNull
in interface ResultSet
columnName
- The column name.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateObject(int columnIndex, Object columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateObject
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid,
or the requested conversion is not valid.public void updateObject(String columnName, Object columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateObject
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found,
or the requested conversion is not valid.public void updateObject(int columnIndex, Object columnValue, int scale) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateObject
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.scale
- The number of digits after the decimal
if SQL type is DECIMAL or NUMERIC.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid,
the scale is not valid, or the
requested conversion is not valid.public void updateObject(String columnName, Object columnValue, int scale) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateObject
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.scale
- The number of digits after the decimal
if SQL type is DECIMAL or NUMERIC.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found,
the scale is not valid, or the
requested conversion is not valid.public void updateRow() throws SQLException
updateRow
in interface ResultSet
SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the cursor is positioned on the insert row,
or an error occurs.public void updateRef(int columnIndex, Ref columnValue) throws SQLException
updateRef
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- Always thrown because DB2 for IBM i does not support REFs.public void updateRef(String columnName, Ref columnValue) throws SQLException
updateRef
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- Always thrown because DB2 for IBM i does not support REFs.public void updateShort(int columnIndex, short columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateShort
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateShort(String columnName, short columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateShort
in interface ResultSet
columnName
- The column name.columnValue
- The column value.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateString(int columnIndex, String columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateString
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid,
or the requested conversion is not valid.public void updateString(String columnName, String columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateString
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateTime(int columnIndex, Time columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateTime
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateTime(String columnName, Time columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateTime
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public void updateTimestamp(int columnIndex, Timestamp columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateTimestamp
in interface ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column index is not valid, or the
requested conversion is not valid.public void updateTimestamp(String columnName, Timestamp columnValue) throws SQLException
This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database.
updateTimestamp
in interface ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.SQLException
- If the result set is not open,
the result set is not updatable,
the cursor is not positioned on a row,
the column name is not found, or the
requested conversion is not valid.public boolean wasNull() throws SQLException
wasNull
in interface ResultSet
SQLException
- If the result set is not open.public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
Reader
object. The
Reader
reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.setNCharacterStream
in interface RowSet
parameterIndex
- of the first parameter is 1, the second is 2, ...value
- the parameter valuelength
- the number of characters in the parameter data.SQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur ; or if a database access error occurspublic void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
Reader
object. The
Reader
reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.setNCharacterStream
in interface RowSet
parameterName
- the name of the column to be setvalue
- the parameter valuelength
- the number of characters in the parameter data.SQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; or if a database access error occurspublic void setNClob(int parameterIndex, NClob value) throws SQLException
java.sql.NClob
object. The driver converts this to a
SQL NCLOB
value when it sends it to the database.setNClob
in interface RowSet
parameterIndex
- of the first parameter is 1, the second is 2, ...value
- the parameter valueSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur ; or if a database access error occurspublic void setNClob(String parameterName, NClob value) throws SQLException
java.sql.NClob
object. The object
implements the java.sql.NClob
interface. This NClob
object maps to a SQL NCLOB
.setNClob
in interface RowSet
parameterName
- the name of the column to be setvalue
- the parameter valueSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; or if a database access error occurspublic void setNString(int parameterIndex, String value) throws SQLException
String
object.
The driver converts this to a SQL NCHAR
or
NVARCHAR
or LONGNVARCHAR
value
(depending on the argument's
size relative to the driver's limits on NVARCHAR
values)
when it sends it to the database.setNString
in interface RowSet
parameterIndex
- of the first parameter is 1, the second is 2, ...value
- the parameter valueSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur ; or if a database access error occurspublic void setNString(String parameterName, String value) throws SQLException
String
object.
The driver converts this to a SQL NCHAR
or
NVARCHAR
or LONGNVARCHAR
setNString
in interface RowSet
parameterName
- the name of the column to be setvalue
- the parameter valueSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; or if a database access error occurspublic void setRowId(int parameterIndex, RowId x) throws SQLException
java.sql.RowId
object. The
driver converts this to a SQL ROWID
value when it sends it
to the databasesetRowId
in interface RowSet
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLException
- if a database access error occurspublic void setRowId(String parameterName, RowId x) throws SQLException
java.sql.RowId
object. The
driver converts this to a SQL ROWID
when it sends it to the
database.setRowId
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurspublic void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
java.sql.SQLXML
object. The driver converts this to an
SQL XML
value when it sends it to the database.setSQLXML
in interface RowSet
parameterIndex
- index of the first parameter is 1, the second is 2, ...xmlObject
- a SQLXML
object that maps an SQL XML
valueSQLException
- if a database access error occurs, this method
is called on a closed result set,
Writer
or OutputStream
has not been closed
for the SQLXML
object or
if there is an error processing the XML value. The getCause
method
of the exception may provide a more detailed exception, for example, if the
stream does not contain valid XML.public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
java.sql.SQLXML
object. The driver converts this to an
SQL XML
value when it sends it to the database.setSQLXML
in interface RowSet
parameterName
- the name of the parameterxmlObject
- a SQLXML
object that maps an SQL XML
valueSQLException
- if a database access error occurs, this method
is called on a closed result set,
Writer
or OutputStream
has not been closed
for the SQLXML
object or
if there is an error processing the XML value. The getCause
method
of the exception may provide a more detailed exception, for example, if the
stream does not contain valid XML.public int getHoldability() throws SQLException
RowSet
objectgetHoldability
in interface ResultSet
ResultSet.HOLD_CURSORS_OVER_COMMIT
or ResultSet.CLOSE_CURSORS_AT_COMMIT
The holdability is derived in this order of precedence:
cursor hold
driver property.SQLException
- if a database error occurspublic Reader getNCharacterStream(int columnIndex) throws SQLException
ResultSet
object as a
java.io.Reader
object.
It is intended for use when
accessing NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.getNCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...java.io.Reader
object that contains the column
value; if the value is SQL NULL
, the value returned is
null
in the Java programming language.SQLException
- if a database access error occurs
or this method is called on a closed result setpublic Reader getNCharacterStream(String columnLabel) throws SQLException
ResultSet
object as a
java.io.Reader
object.
It is intended for use when
accessing NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.getNCharacterStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnjava.io.Reader
object that contains the column
value; if the value is SQL NULL
, the value returned is
null
in the Java programming languageSQLException
- if a database access error occurs
or this method is called on a closed result setpublic NClob getNClob(int columnIndex) throws SQLException
ResultSet
object as a NClob
object
in the Java programming language.getNClob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...NClob
object representing the SQL
NCLOB
value in the specified columnSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set
or if a database access error occurspublic NClob getNClob(String columnLabel) throws SQLException
ResultSet
object as a NClob
object
in the Java programming language.getNClob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnNClob
object representing the SQL NCLOB
value in the specified columnSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set
or if a database access error occurspublic String getNString(int columnIndex) throws SQLException
ResultSet
object as
a String
in the Java programming language.
It is intended for use when
accessing NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.getNString
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...NULL
, the
value returned is null
SQLException
- if a database access error occurs
or this method is called on a closed result setpublic String getNString(String columnLabel) throws SQLException
ResultSet
object as
a String
in the Java programming language.
It is intended for use when
accessing NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.getNString
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnNULL
, the
value returned is null
SQLException
- if a database access error occurs
or this method is called on a closed result setpublic RowId getRowId(int columnIndex) throws SQLException
ResultSet
object as a java.sql.RowId
object in the Java
programming language.getRowId
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...NULL
the
value returned is null
SQLException
- if a database access error occurs
or this method is called on a closed result setpublic RowId getRowId(String columnLabel) throws SQLException
ResultSet
object as a java.sql.RowId
object in the Java
programming language.getRowId
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnNULL
the
value returned is null
SQLException
- if a database access error occurs
or this method is called on a closed result setpublic SQLXML getSQLXML(int columnIndex) throws SQLException
ResultSet
as a
java.sql.SQLXML
object in the Java programming language.getSQLXML
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...SQLXML
object that maps an SQL XML
valueSQLException
- if a database access error occurs
or this method is called on a closed result setpublic SQLXML getSQLXML(String columnLabel) throws SQLException
ResultSet
as a
java.sql.SQLXML
object in the Java programming language.getSQLXML
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnSQLXML
object that maps an SQL XML
valueSQLException
- if a database access error occurs
or this method is called on a closed result setpublic boolean isClosed() throws SQLException
ResultSet
object has been closed. A ResultSet
is closed if the
method close has been called on it, or if it is automatically closed.isClosed
in interface ResultSet
ResultSet
object is closed; false if it is still openSQLException
- if a database access error occurspublic void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
updateRow
or
insertRow
methods are called to update the database.updateAsciiStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
updateRow
or
insertRow
methods are called to update the database.updateAsciiStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
updateRow
or
insertRow
methods are called to update the database.updateBinaryStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
updateRow
or
insertRow
methods are called to update the database.updateBinaryStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream
. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
updateBlob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...inputStream
- An object that contains the data to set the parameter
value to.length
- the number of bytes in the parameter data.SQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream
. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
updateBlob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columninputStream
- An object that contains the data to set the parameter
value to.length
- the number of bytes in the parameter data.SQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
updateRow
or
insertRow
methods are called to update the database.updateCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
updateRow
or
insertRow
methods are called to update the database.updateCharacterStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- the java.io.Reader
object containing
the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateClob(int columnIndex, Reader reader, long length) throws SQLException
Reader
object, which is the given number of characters long.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
updateClob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...reader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateClob(String columnLabel, Reader reader, long length) throws SQLException
Reader
object, which is the given number of characters long.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
updateClob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.updateNCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.updateNCharacterStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- the java.io.Reader
object containing
the new column valuelength
- the length of the streamSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateNClob(int columnIndex, NClob nClob) throws SQLException
java.sql.NClob
value.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.updateNClob
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...nClob
- the value for the column to be updatedSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set,
if a database access error occurs or
the result set concurrency is CONCUR_READ_ONLY
public void updateNClob(String columnLabel, NClob nClob) throws SQLException
java.sql.NClob
value.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.updateNClob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnnClob
- the value for the column to be updatedSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set;
if a database access error occurs or
the result set concurrency is CONCUR_READ_ONLY
public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
Reader
object, which is the given number of characters long.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
updateNClob
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...reader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set,
if a database access error occurs or
the result set concurrency is CONCUR_READ_ONLY
public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
Reader
object, which is the given number of characters long.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
updateNClob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set;
if a database access error occurs or
the result set concurrency is CONCUR_READ_ONLY
public void updateNString(int columnIndex, String nString) throws SQLException
String
value.
It is intended for use when updating NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.updateNString
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...nString
- the value for the column to be updatedSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set,
the result set concurrency is CONCUR_READ_ONLY
or if a database access error occurspublic void updateNString(String columnLabel, String nString) throws SQLException
String
value.
It is intended for use when updating NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.updateNString
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnnString
- the value for the column to be updatedSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set;
the result set concurrency is CONCUR_READ_ONLY
or if a database access error occurspublic void updateRowId(int columnIndex, RowId x) throws SQLException
RowId
value. The updater
methods are used to update column values in the current row or the insert
row. The updater methods do not update the underlying database; instead
the updateRow
or insertRow
methods are called
to update the database.updateRowId
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...x
- the column valueSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateRowId(String columnLabel, RowId x) throws SQLException
RowId
value. The updater
methods are used to update column values in the current row or the insert
row. The updater methods do not update the underlying database; instead
the updateRow
or insertRow
methods are called
to update the database.updateRowId
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the column valueSQLException
- if a database access error occurs,
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
java.sql.SQLXML
value.
The updater
methods are used to update column values in the current row or the insert
row. The updater methods do not update the underlying database; instead
the updateRow
or insertRow
methods are called
to update the database.
updateSQLXML
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...xmlObject
- the value for the column to be updatedSQLException
- if a database access error occurs, this method
is called on a closed result set,
the java.xml.transform.Result
,
Writer
or OutputStream
has not been closed
for the SQLXML
object,
if there is an error processing the XML value or
the result set concurrency is CONCUR_READ_ONLY
. The getCause
method
of the exception may provide a more detailed exception, for example, if the
stream does not contain valid XML.public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
java.sql.SQLXML
value.
The updater
methods are used to update column values in the current row or the insert
row. The updater methods do not update the underlying database; instead
the updateRow
or insertRow
methods are called
to update the database.
updateSQLXML
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnxmlObject
- the column valueSQLException
- if a database access error occurs, this method
is called on a closed result set,
the java.xml.transform.Result
,
Writer
or OutputStream
has not been closed
for the SQLXML
object,
if there is an error processing the XML value or
the result set concurrency is CONCUR_READ_ONLY
. The getCause
method
of the exception may provide a more detailed exception, for example, if the
stream does not contain valid XML.protected String[] getValidWrappedList()
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
RowSet
object's command
to the given input stream.
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
. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setAsciiStream
which takes a length parameter.
setAsciiStream
in interface RowSet
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the Java input stream that contains the ASCII parameter valueSQLException
- if a database access error occurs or
this method is called on a closed PreparedStatement
public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream
. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setAsciiStream
in interface RowSet
parameterName
- the name of the parameterx
- the Java input stream that contains the ASCII parameter valuelength
- the number of bytes in the streamSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setAsciiStream(String parameterName, InputStream x) throws SQLException
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream
. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setAsciiStream
which takes a length parameter.
setAsciiStream
in interface RowSet
parameterName
- the name of the parameterx
- the Java input stream that contains the ASCII parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException
java.math.BigDecimal
value.
The driver converts this to an SQL NUMERIC
value when
it sends it to the database.setBigDecimal
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getBigDecimal(int)
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
RowSet
object's command
to the given input stream.
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
object. The data will be read from the
stream as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setBinaryStream
which takes a length parameter.
setBinaryStream
in interface RowSet
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the java input stream which contains the binary parameter valueSQLException
- if a database access error occurs or
this method is called on a closed PreparedStatement
public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream
object. The data will be read from the stream
as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setBinaryStream
in interface RowSet
parameterName
- the name of the parameterx
- the java input stream which contains the binary parameter valuelength
- the number of bytes in the streamSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setBinaryStream(String parameterName, InputStream x) throws SQLException
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream
object. The data will be read from the
stream as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setBinaryStream
which takes a length parameter.
setBinaryStream
in interface RowSet
parameterName
- the name of the parameterx
- the java input stream which contains the binary parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
InputStream
object. The inputstream must contain the number
of characters specified by length otherwise a SQLException
will be
generated when the PreparedStatement
is executed.
This method differs from the setBinaryStream (int, InputStream, int)
method because it informs the driver that the parameter value should be
sent to the server as a BLOB
. When the setBinaryStream
method is used,
the driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGVARBINARY
or a BLOB
setBlob
in interface RowSet
parameterIndex
- index of the first parameter is 1,
the second is 2, ...inputStream
- An object that contains the data to set the parameter
value to.length
- the number of bytes in the parameter data.SQLException
- if a database access error occurs,
this method is called on a closed PreparedStatement
,
if parameterIndex does not correspond
to a parameter marker in the SQL statement, if the length specified
is less than zero or if the number of bytes in the inputstream does not match
the specfied length.public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
InputStream
object.
This method differs from the setBinaryStream (int, InputStream)
method because it informs the driver that the parameter value should be
sent to the server as a BLOB
. When the setBinaryStream
method is used,
the driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGVARBINARY
or a BLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setBlob
which takes a length parameter.
setBlob
in interface RowSet
parameterIndex
- index of the first parameter is 1,
the second is 2, ...inputStream
- An object that contains the data to set the parameter
value to.SQLException
- if a database access error occurs,
this method is called on a closed PreparedStatement
or
if parameterIndex does not correspond
to a parameter marker in the SQL statement,public void setBlob(String parameterName, Blob x) throws SQLException
java.sql.Blob
object.
The driver converts this to an SQL BLOB
value when it
sends it to the database.setBlob
in interface RowSet
parameterName
- the name of the parameterx
- a Blob
object that maps an SQL BLOB
valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
InputStream
object. The inputstream
must contain the number
of characters specified by length, otherwise a SQLException
will be
generated when the CallableStatement
is executed.
This method differs from the setBinaryStream (int, InputStream, int)
method because it informs the driver that the parameter value should be
sent to the server as a BLOB
. When the setBinaryStream
method is used,
the driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGVARBINARY
or a BLOB
setBlob
in interface RowSet
parameterName
- the name of the parameter to be set
the second is 2, ...inputStream
- An object that contains the data to set the parameter
value to.length
- the number of bytes in the parameter data.SQLException
- if parameterIndex does not correspond
to a parameter marker in the SQL statement, or if the length specified
is less than zero; if the number of bytes in the inputstream does not match
the specfied length; if a database access error occurs or
this method is called on a closed CallableStatement
public void setBlob(String parameterName, InputStream inputStream) throws SQLException
InputStream
object.
This method differs from the setBinaryStream (int, InputStream)
method because it informs the driver that the parameter value should be
sent to the server as a BLOB
. When the setBinaryStream
method is used,
the driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGVARBINARY
or a BLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setBlob
which takes a length parameter.
setBlob
in interface RowSet
parameterName
- the name of the parameterinputStream
- An object that contains the data to set the parameter
value to.SQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setBoolean(String parameterName, boolean x) throws SQLException
boolean
value.
The driver converts this
to an SQL BIT
or BOOLEAN
value when it sends it to the database.setBoolean
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getBoolean(int)
public void setByte(String parameterName, byte x) throws SQLException
byte
value.
The driver converts this
to an SQL TINYINT
value when it sends it to the database.setByte
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getByte(int)
public void setBytes(String parameterName, byte[] x) throws SQLException
VARBINARY
or
LONGVARBINARY
(depending on the argument's size relative
to the driver's limits on VARBINARY
values) when it sends
it to the database.setBytes
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getBytes(int)
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
RowSet
object's command
to the given Reader
object.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setCharacterStream
which takes a length parameter.
setCharacterStream
in interface RowSet
parameterIndex
- the first parameter is 1, the second is 2, ...reader
- the java.io.Reader
object that contains the
Unicode dataSQLException
- if a database access error occurs or
this method is called on a closed PreparedStatement
public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException
Reader
object, which is the given number of characters long.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream
in interface RowSet
parameterName
- the name of the parameterreader
- the java.io.Reader
object that
contains the UNICODE data used as the designated parameterlength
- the number of characters in the streamSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setCharacterStream(String parameterName, Reader reader) throws SQLException
Reader
object.
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
object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setCharacterStream
which takes a length parameter.
setCharacterStream
in interface RowSet
parameterName
- the name of the parameterreader
- the java.io.Reader
object that contains the
Unicode dataSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
Reader
object. The reader must contain the number
of characters specified by length otherwise a SQLException
will be
generated when the PreparedStatement
is executed.
This method differs from the setCharacterStream (int, Reader, int)
method
because it informs the driver that the parameter value should be sent to
the server as a CLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGVARCHAR
or a CLOB
setClob
in interface RowSet
parameterIndex
- index of the first parameter is 1, the second is 2, ...reader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if a database access error occurs, this method is called on
a closed PreparedStatement
, if parameterIndex does not correspond to a parameter
marker in the SQL statement, or if the length specified is less than zero.public void setClob(int parameterIndex, Reader reader) throws SQLException
Reader
object.
This method differs from the setCharacterStream (int, Reader)
method
because it informs the driver that the parameter value should be sent to
the server as a CLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGVARCHAR
or a CLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setClob
which takes a length parameter.
setClob
in interface RowSet
parameterIndex
- index of the first parameter is 1, the second is 2, ...reader
- An object that contains the data to set the parameter value to.SQLException
- if a database access error occurs, this method is called on
a closed PreparedStatement
or if parameterIndex does not correspond to a parameter
marker in the SQL statementpublic void setClob(String parameterName, Clob x) throws SQLException
java.sql.Clob
object.
The driver converts this to an SQL CLOB
value when it
sends it to the database.setClob
in interface RowSet
parameterName
- the name of the parameterx
- a Clob
object that maps an SQL CLOB
valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setClob(String parameterName, Reader reader, long length) throws SQLException
Reader
object. The reader
must contain the number
of characters specified by length otherwise a SQLException
will be
generated when the CallableStatement
is executed.
This method differs from the setCharacterStream (int, Reader, int)
method
because it informs the driver that the parameter value should be sent to
the server as a CLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGVARCHAR
or a CLOB
setClob
in interface RowSet
parameterName
- the name of the parameter to be setreader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if parameterIndex does not correspond to a parameter
marker in the SQL statement; if the length specified is less than zero;
a database access error occurs or
this method is called on a closed CallableStatement
public void setClob(String parameterName, Reader reader) throws SQLException
Reader
object.
This method differs from the setCharacterStream (int, Reader)
method
because it informs the driver that the parameter value should be sent to
the server as a CLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGVARCHAR
or a CLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setClob
which takes a length parameter.
setClob
in interface RowSet
parameterName
- the name of the parameterreader
- An object that contains the data to set the parameter value to.SQLException
- if a database access error occurs or this method is called on
a closed CallableStatement
public void setDate(String parameterName, Date x, Calendar cal) throws SQLException
java.sql.Date
value,
using the given Calendar
object. The driver uses
the Calendar
object to construct an SQL DATE
value,
which the driver then sends to the database. With a
a Calendar
object, the driver can calculate the date
taking into account a custom timezone. If no
Calendar
object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application.setDate
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valuecal
- the Calendar
object the driver will use
to construct the dateSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getDate(int)
public void setDate(String parameterName, Date x) throws SQLException
java.sql.Date
value
using the default time zone of the virtual machine that is running
the application.
The driver converts this
to an SQL DATE
value when it sends it to the database.setDate
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getDate(int)
public void setDouble(String parameterName, double x) throws SQLException
double
value.
The driver converts this
to an SQL DOUBLE
value when it sends it to the database.setDouble
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getDouble(int)
public void setFloat(String parameterName, float x) throws SQLException
float
value.
The driver converts this
to an SQL FLOAT
value when it sends it to the database.setFloat
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getFloat(int)
public void setInt(String parameterName, int x) throws SQLException
int
value.
The driver converts this
to an SQL INTEGER
value when it sends it to the database.setInt
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getInt(int)
public void setLong(String parameterName, long x) throws SQLException
long
value.
The driver converts this
to an SQL BIGINT
value when it sends it to the database.setLong
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getLong(int)
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
RowSet
object's command
to a Reader
object. The
Reader
reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setNCharacterStream
which takes a length parameter.
setNCharacterStream
in interface RowSet
parameterIndex
- of the first parameter is 1, the second is 2, ...value
- the parameter valueSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur ; if a database access error occurs; or
this method is called on a closed PreparedStatement
public void setNCharacterStream(String parameterName, Reader value) throws SQLException
Reader
object. The
Reader
reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setNCharacterStream
which takes a length parameter.
setNCharacterStream
in interface RowSet
parameterName
- the name of the parametervalue
- the parameter valueSQLException
- if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur ; if a database access error occurs; or
this method is called on a closed CallableStatement
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
Reader
object. The reader must contain the number
of characters specified by length otherwise a SQLException
will be
generated when the PreparedStatement
is executed.
This method differs from the setCharacterStream (int, Reader, int)
method
because it informs the driver that the parameter value should be sent to
the server as a NCLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGNVARCHAR
or a NCLOB
setNClob
in interface RowSet
parameterIndex
- index of the first parameter is 1, the second is 2, ...reader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if parameterIndex does not correspond to a parameter
marker in the SQL statement; if the length specified is less than zero;
if the driver does not support national character sets;
if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed PreparedStatement
public void setNClob(int parameterIndex, Reader reader) throws SQLException
Reader
object.
This method differs from the setCharacterStream (int, Reader)
method
because it informs the driver that the parameter value should be sent to
the server as a NCLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGNVARCHAR
or a NCLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setNClob
which takes a length parameter.
setNClob
in interface RowSet
parameterIndex
- index of the first parameter is 1, the second is 2, ...reader
- An object that contains the data to set the parameter value to.SQLException
- if parameterIndex does not correspond to a parameter
marker in the SQL statement;
if the driver does not support national character sets;
if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed PreparedStatement
public void setNClob(String parameterName, Reader reader, long length) throws SQLException
Reader
object. The reader
must contain the number
of characters specified by length otherwise a SQLException
will be
generated when the CallableStatement
is executed.
This method differs from the setCharacterStream (int, Reader, int)
method
because it informs the driver that the parameter value should be sent to
the server as a NCLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGNVARCHAR
or a NCLOB
setNClob
in interface RowSet
parameterName
- the name of the parameter to be setreader
- An object that contains the data to set the parameter value to.length
- the number of characters in the parameter data.SQLException
- if parameterIndex does not correspond to a parameter
marker in the SQL statement; if the length specified is less than zero;
if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed CallableStatement
public void setNClob(String parameterName, Reader reader) throws SQLException
Reader
object.
This method differs from the setCharacterStream (int, Reader)
method
because it informs the driver that the parameter value should be sent to
the server as a NCLOB
. When the setCharacterStream
method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGNVARCHAR
or a NCLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setNClob
which takes a length parameter.
setNClob
in interface RowSet
parameterName
- the name of the parameterreader
- An object that contains the data to set the parameter value to.SQLException
- if the driver does not support national character sets;
if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed CallableStatement
public void setNull(String parameterName, int sqlType, String typeName) throws SQLException
NULL
.
This version of the method setNull
should
be used for user-defined types and REF type parameters. Examples
of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
named array types.
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-defined 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. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-defined 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-defined or REF type, the given typeName is ignored.
setNull
in interface RowSet
parameterName
- the name of the parametersqlType
- a value from java.sql.Types
typeName
- the fully-qualified name of an SQL user-defined type;
ignored if the parameter is not a user-defined type or
SQL REF
valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setNull(String parameterName, int sqlType) throws SQLException
NULL
.
Note: You must specify the parameter's SQL type.
setNull
in interface RowSet
parameterName
- the name of the parametersqlType
- the SQL type code defined in java.sql.Types
SQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException
java.lang
equivalent objects should be used.
The given Java object will be converted to the given targetSqlType
before being sent to the database.
If the object has a custom mapping (is of a class implementing the
interface SQLData
),
the JDBC driver should call the method SQLData.writeSQL
to write it
to the SQL data stream.
If, on the other hand, the object is of a class implementing
Ref
, Blob
, Clob
, NClob
,
Struct
, java.net.URL
,
or Array
, the driver should pass it to the database as a
value of the corresponding SQL type.
Note that this method may be used to pass datatabase- specific abstract data types.
setObject
in interface RowSet
parameterName
- the name of the parameterx
- 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 point. For all other
types, this value will be ignored.SQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
Types
,
getObject(int)
public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException
setObject
above, except that it assumes a scale of zero.setObject
in interface RowSet
parameterName
- the name of the parameterx
- the object containing the input parameter valuetargetSqlType
- the SQL type (as defined in java.sql.Types) to be
sent to the databaseSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getObject(int)
public void setObject(String parameterName, Object x) throws SQLException
Object
; therefore, the
java.lang
equivalent objects should be used for built-in types.
The JDBC specification specifies a standard mapping from
Java Object
types to SQL types. The given argument
will be converted to the corresponding SQL type 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.
If the object is of a class implementing the interface SQLData
,
the JDBC driver should call the method SQLData.writeSQL
to write it to the SQL data stream.
If, on the other hand, the object is of a class implementing
Ref
, Blob
, Clob
, NClob
,
Struct
, java.net.URL
,
or Array
, the driver should pass it to the database as a
value of the corresponding SQL type.
This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.
setObject
in interface RowSet
parameterName
- the name of the parameterx
- the object containing the input parameter valueSQLException
- if a database access error occurs,
this method is called on a closed CallableStatement
or if the given
Object
parameter is ambiguousgetObject(int)
public void setShort(String parameterName, short x) throws SQLException
short
value.
The driver converts this
to an SQL SMALLINT
value when it sends it to the database.setShort
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getShort(int)
public void setString(String parameterName, String x) throws SQLException
String
value.
The driver converts this
to an SQL VARCHAR
or LONGVARCHAR
value
(depending on the argument's
size relative to the driver's limits on VARCHAR
values)
when it sends it to the database.setString
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getString(int)
public void setTime(String parameterName, Time x, Calendar cal) throws SQLException
java.sql.Time
value,
using the given Calendar
object. The driver uses
the Calendar
object to construct an SQL TIME
value,
which the driver then sends to the database. With a
a Calendar
object, the driver can calculate the time
taking into account a custom timezone. If no
Calendar
object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application.setTime
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valuecal
- the Calendar
object the driver will use
to construct the timeSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getTime(int)
public void setTime(String parameterName, Time x) throws SQLException
java.sql.Time
value.
The driver converts this
to an SQL TIME
value when it sends it to the database.setTime
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getTime(int)
public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException
java.sql.Timestamp
value,
using the given Calendar
object. The driver uses
the Calendar
object to construct an SQL TIMESTAMP
value,
which the driver then sends to the database. With a
a Calendar
object, the driver can calculate the timestamp
taking into account a custom timezone. If no
Calendar
object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application.setTimestamp
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valuecal
- the Calendar
object the driver will use
to construct the timestampSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getTimestamp(int)
public void setTimestamp(String parameterName, Timestamp x) throws SQLException
java.sql.Timestamp
value.
The driver
converts this to an SQL TIMESTAMP
value when it sends it to the
database.setTimestamp
in interface RowSet
parameterName
- the name of the parameterx
- the parameter valueSQLException
- if a database access error occurs or
this method is called on a closed CallableStatement
getTimestamp(int)
public void setURL(int parameterIndex, URL x) throws SQLException
java.net.URL
value.
The driver converts this to an SQL DATALINK
value
when it sends it to the database.setURL
in interface RowSet
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the java.net.URL
object to be setSQLException
- if a database access error occurs or
this method is called on a closed PreparedStatement
public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateAsciiStream
which takes a length parameter.
updateAsciiStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- if the columnIndex is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateAsciiStream
which takes a length parameter.
updateAsciiStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column valueSQLException
- if the columnLabel is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateBinaryStream
which takes a length parameter.
updateBinaryStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- if the columnIndex is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateBinaryStream
which takes a length parameter.
updateBinaryStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnx
- the new column valueSQLException
- if the columnLabel is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateBlob
which takes a length parameter.
updateBlob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...inputStream
- An object that contains the data to set the parameter
value to.SQLException
- if the columnIndex is not valid; if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateBlob(String columnLabel, InputStream inputStream) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateBlob
which takes a length parameter.
updateBlob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columninputStream
- An object that contains the data to set the parameter
value to.SQLException
- if the columnLabel is not valid; if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateCharacterStream(int columnIndex, Reader x) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateCharacterStream
which takes a length parameter.
updateCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- if the columnIndex is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateCharacterStream(String columnLabel, Reader reader) throws SQLException
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateCharacterStream
which takes a length parameter.
updateCharacterStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- the java.io.Reader
object containing
the new column valueSQLException
- if the columnLabel is not valid; if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateClob(int columnIndex, Reader reader) throws SQLException
Reader
object.
The data will be read from the stream
as needed until end-of-stream is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateClob
which takes a length parameter.
updateClob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...reader
- An object that contains the data to set the parameter value to.SQLException
- if the columnIndex is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateClob(String columnLabel, Reader reader) throws SQLException
Reader
object.
The data will be read from the stream
as needed until end-of-stream is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateClob
which takes a length parameter.
updateClob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- An object that contains the data to set the parameter value to.SQLException
- if the columnLabel is not valid; if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateNCharacterStream
which takes a length parameter.
updateNCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- if the columnIndex is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException
NCHAR
,NVARCHAR
and LONGNVARCHAR
columns.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateNCharacterStream
which takes a length parameter.
updateNCharacterStream
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- the java.io.Reader
object containing
the new column valueSQLException
- if the columnLabel is not valid;
if a database access error occurs;
the result set concurrency is CONCUR_READ_ONLY
or this method is called on a closed result setpublic void updateNClob(int columnIndex, Reader reader) throws SQLException
Reader
The data will be read from the stream
as needed until end-of-stream is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateNClob
which takes a length parameter.
updateNClob
in interface ResultSet
columnIndex
- the first column is 1, the second 2, ...reader
- An object that contains the data to set the parameter value to.SQLException
- if the columnIndex is not valid;
if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set,
if a database access error occurs or
the result set concurrency is CONCUR_READ_ONLY
public void updateNClob(String columnLabel, Reader reader) throws SQLException
Reader
object.
The data will be read from the stream
as needed until end-of-stream is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
The updater methods are used to update column values in the
current row or the insert row. The updater methods do not
update the underlying database; instead the updateRow
or
insertRow
methods are called to update the database.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
updateNClob
which takes a length parameter.
updateNClob
in interface ResultSet
columnLabel
- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columnreader
- An object that contains the data to set the parameter value to.SQLException
- if the columnLabel is not valid; if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; this method is called on a closed result set;
if a database access error occurs or
the result set concurrency is CONCUR_READ_ONLY
public Object getObject(int columnIndex, Class type) throws SQLException
getObject
in interface ResultSet
SQLException
public Object getObject(String columnLabel, Class type) throws SQLException
getObject
in interface ResultSet
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
on the wrapped object. If this does not
implement the interface and is not a wrapper, return false. This method
should be implemented as a low-cost operation compared to
unwrap
so that callers can use this method to avoid
expensive unwrap
calls that may fail. If this method
returns true then calling unwrap
with the same argument
should succeed.isWrapperFor
in interface Wrapper
iface
- a Class defining an interface.SQLException
- If a database error occurs.
if an error occurs while determining whether this is a
wrapper for an object with the given interface.public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
recursively on the wrapped object or a
proxy for that result. If the receiver is not a wrapper and does not
implement the interface, then an SQLException
is thrown.unwrap
in interface Wrapper
iface
- A Class defining an interface that the result must implement.SQLException
- If a database error occurs.
If no object found that implements the interfaceCopyright © 2025. All rights reserved.