All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.AS400JDBCResultSet

java.lang.Object
   |
   +----com.ibm.as400.access.AS400JDBCResultSet

public class AS400JDBCResultSet
extends Object
implements ResultSet

The AS400JDBCResultSet class provides access to a table of data generated by a database query.

A result set maintains a cursor pointing to its current row of data. Initially, the cursor is positioned before the first row. If the result set is scrollable, use any of the cursor positioning methods to move the cursor within the result set. If the result set is not scrollable, then only use next() to move the cursor.

The get methods retrieve column values for the current row. Values can be retrieved using either the column index or the column name. In general, using the column index is more efficient. Column indexes are numbered starting with 1. Column names are not case sensitive. If several columns have the same name, then the first matching column is used.

Columns can have two names: a column name ("long name") and a system column name ("short name"). The get methods and findColumn() only support using the column name.

In each get method, the driver attempts to convert the underlying data to the specified Java type and returns a suitable Java value. If such a conversion is not appropriate, an SQLException is thrown.

If the result set is updatable, the update methods modify column values for the current row, but not in the underlying database. updateRow() causes all updates to the current row to be written to the database. Use deleteRow() to delete the current row in the database.

For updatable result sets, there is also an insert row, which is used as a staging area for the contents of a new row. Use moveToInsertRow() to position the cursor to the insert row. Once all updates to the insert row have been made, use insertRow() to insert the row into the database.

In the following cases, result sets are always read only regardless of the concurrency set in the statement:

In the following cases, result sets are always forward only regardless of the type set in the statement:

A result set is automatically closed by the statement that generated it when the statement is closed, run again, or used to retrieve the next result set from a sequence of multiple result sets.


Method Index

 o absolute(int)
Positions the cursor to an absolute row number.
 o afterLast()
Positions the cursor after the last row.
 o beforeFirst()
Positions the cursor before the first row.
 o cancelRowUpdates()
Cancels all pending updates that have been made since the last call to updateRow().
 o clearWarnings()
Clears all warnings that have been reported for the result set.
 o close()
Releases the result set's resources immediately instead of waiting for them to be automatically released.
 o deleteRow()
Deletes the current row from the result set and the database.
 o finalize()
Closes the result set if not explicitly closed by the caller.
 o findColumn(String)
Returns the column index for the specified column name.
 o first()
Positions the cursor to the first row.
 o getArray(int)
Returns the value of a column as an Array object.
 o getArray(String)
Returns the value of a column as an Array object.
 o getAsciiStream(int)
Returns the value of a column as a stream of ASCII characters.
 o getAsciiStream(String)
Returns the value of a column as a stream of ASCII characters.
 o getBigDecimal(int)
Returns the value of a column as a BigDecimal object.
 o getBigDecimal(int, int)
Returns the value of a column as a BigDecimal object. Deprecated.
 o getBigDecimal(String)
Returns the value of a column as a BigDecimal object.
 o getBigDecimal(String, int)
Returns the value of a column as a BigDecimal object. Deprecated.
 o getBinaryStream(int)
Returns the value of a column as a stream of uninterpreted bytes.
 o getBinaryStream(String)
Returns the value of a column as a stream of uninterpreted bytes.
 o getBlob(int)
Returns the value of a column as a Blob object.
 o getBlob(String)
Returns the value of a column as a Blob object.
 o getBoolean(int)
Returns the value of a column as a Java boolean value.
 o getBoolean(String)
Returns the value of a column as a Java boolean value.
 o getByte(int)
Returns the value of a column as a Java byte value.
 o getByte(String)
Returns the value of a column as a Java byte value.
 o getBytes(int)
Returns the value of a column as a Java byte array.
 o getBytes(String)
Returns the value of a column as a Java byte array.
 o getCharacterStream(int)
Returns the value of a column as a character stream.
 o getCharacterStream(String)
Returns the value of a column as a character stream.
 o getClob(int)
Returns the value of a column as a Clob object.
 o getClob(String)
Returns the value of a column as a Clob object.
 o getConcurrency()
Returns the result set concurrency.
 o getCursorName()
Returns the name of the SQL cursor in use by the result set.
 o getDate(int)
Returns the value of a column as a java.sql.Date object using the default calendar.
 o getDate(int, Calendar)
Returns the value of a column as a java.sql.Date object using a calendar other than the default.
 o getDate(String)
Returns the value of a column as a java.sql.Date object using the default calendar.
 o getDate(String, Calendar)
Returns the value of a column as a java.sql.Date object using a calendar other than the default.
 o getDouble(int)
Returns the value of a column as a Java double value.
 o getDouble(String)
Returns the value of a column as a Java double value.
 o getFetchDirection()
Returns the fetch direction.
 o getFetchSize()
Returns the fetch size.
 o getFloat(int)
Returns the value of a column as a Java float value.
 o getFloat(String)
Returns the value of a column as a Java float value.
 o getInt(int)
Returns the value of a column as a Java int value.
 o getInt(String)
Returns the value of a column as a Java int value.
 o getLong(int)
Returns the value of a column as a Java long value.
 o getLong(String)
Returns the value of a column as a Java long value.
 o getMetaData()
Returns the ResultSetMetaData object that describes the result set's columns.
 o getObject(int)
Returns the value of a column as a Java Object.
 o getObject(int, Map)
Returns the value of a column as a Java Object.
 o getObject(String)
Returns the value of a column as a Java Object.
 o getObject(String, Map)
Returns the value of a column as a Java Object.
 o getRef(int)
Returns the value of a column as a Ref object.
 o getRef(String)
Returns the value of a column as a Ref object.
 o getRow()
Returns the current row number.
 o getShort(int)
Returns the value of a column as a Java short value.
 o getShort(String)
Returns the value of a column as a Java short value.
 o getStatement()
Returns the statement for this result set.
 o getString(int)
Returns the value of a column as a String object.
 o getString(String)
Returns the value of a column as a String object.
 o getTime(int)
Returns the value of a column as a java.sql.Time object using the default calendar.
 o getTime(int, Calendar)
Returns the value of a column as a java.sql.Time object using a calendar other than the default.
 o getTime(String)
Returns the value of a column as a java.sql.Time object using the default calendar.
 o getTime(String, Calendar)
Returns the value of a column as a java.sql.Time object using a calendar other than the default.
 o getTimestamp(int)
Returns the value of a column as a java.sql.Timestamp object using the default calendar.
 o getTimestamp(int, Calendar)
Returns the value of a column as a java.sql.Timestamp object using a calendar other than the default.
 o getTimestamp(String)
Returns the value of a column as a java.sql.Timestamp object using the default calendar.
 o getTimestamp(String, Calendar)
Returns the value of a column as a java.sql.Timestamp object using a calendar other than the default.
 o getType()
Returns the result set type.
 o getUnicodeStream(int)
Returns the value of a column as a stream of Unicode characters. Deprecated.
 o getUnicodeStream(String)
Returns the value of a column as a stream of Unicode characters. Deprecated.
 o getWarnings()
Returns the first warning reported for the result set.
 o insertRow()
Inserts the contents of the insert row into the result set and the database.
 o isAfterLast()
Indicates if the cursor is positioned after the last row.
 o isBeforeFirst()
Indicates if the cursor is positioned before the first row.
 o isFirst()
Indicates if the cursor is positioned on the first row.
 o isLast()
Indicates if the cursor is positioned on the last row.
 o last()
Positions the cursor to the last row.
 o moveToCurrentRow()
Positions the cursor to the current row.
 o moveToInsertRow()
Positions the cursor to the insert row.
 o next()
Positions the cursor to the next row.
 o previous()
Positions the cursor to the previous row.
 o refreshRow()
Refreshes the current row from the database and cancels all pending updates that have been made since the last call to updateRow().
 o relative(int)
Positions the cursor to a relative row number.
 o rowDeleted()
Indicates if the current row has been deleted.
 o rowInserted()
Indicates if the current row has been inserted.
 o rowUpdated()
Indicates if the current row has been updated.
 o setFetchDirection(int)
Sets the direction in which the rows in a result set are processed.
 o setFetchSize(int)
Sets the number of rows to be fetched from the database when more rows are needed.
 o toString()
Returns the name of the SQL cursor in use by the result set.
 o updateAsciiStream(int, InputStream, int)
Updates a column in the current row using an ASCII stream value.
 o updateAsciiStream(String, InputStream, int)
Updates a column in the current row using an ASCII stream value.
 o updateBigDecimal(int, BigDecimal)
Updates a column in the current row using a BigDecimal value.
 o updateBigDecimal(String, BigDecimal)
Updates a column in the current row using a BigDecimal value.
 o updateBinaryStream(int, InputStream, int)
Updates a column in the current row using a binary stream value.
 o updateBinaryStream(String, InputStream, int)
Updates a column in the current row using a binary stream value.
 o updateBoolean(int, boolean)
Updates a column in the current row using a Java boolean value.
 o updateBoolean(String, boolean)
Updates a column in the current row using a Java boolean value.
 o updateByte(int, byte)
Updates a column in the current row using a Java byte value.
 o updateByte(String, byte)
Updates a column in the current row using a Java byte value.
 o updateBytes(int, byte[])
Updates a column in the current row using a Java byte array value.
 o updateBytes(String, byte[])
Updates a column in the current row using a Java byte array value.
 o updateCharacterStream(int, Reader, int)
Updates a column in the current row using a Reader value.
 o updateCharacterStream(String, Reader, int)
Updates a column in the current row using a Reader value.
 o updateDate(int, Date)
Updates a column in the current row using a java.sql.Date value.
 o updateDate(String, Date)
Updates a column in the current row using a java.sql.Date value.
 o updateDouble(int, double)
Updates a column in the current row using a Java double value.
 o updateDouble(String, double)
Updates a column in the current row using a Java double value.
 o updateFloat(int, float)
Updates a column in the current row using a Java float value.
 o updateFloat(String, float)
Updates a column in the current row using a Java float value.
 o updateInt(int, int)
Updates a column in the current row using a Java int value.
 o updateInt(String, int)
Updates a column in the current row using a Java int value.
 o updateLong(int, long)
Updates a column in the current row using a Java long value.
 o updateLong(String, long)
Updates a column in the current row using a Java long value.
 o updateNull(int)
Updates a column in the current row using SQL NULL.
 o updateNull(String)
Updates a column in the current row using SQL NULL.
 o updateObject(int, Object)
Updates a column in the current row using an Object value.
 o updateObject(int, Object, int)
Updates a column in the current row using an Object value.
 o updateObject(String, Object)
Updates a column in the current row using an Object value.
 o updateObject(String, Object, int)
Updates a column in the current row using an Object value.
 o updateRow()
Updates the database with the new contents of the current row.
 o updateShort(int, short)
Updates a column in the current row using a Java short value.
 o updateShort(String, short)
Updates a column in the current row using a Java short value.
 o updateString(int, String)
Updates a column in the current row using a String value.
 o updateString(String, String)
Updates a column in the current row using a String value.
 o updateTime(int, Time)
Updates a column in the current row using a java.sql.Time value.
 o updateTime(String, Time)
Updates a column in the current row using a java.sql.Time value.
 o updateTimestamp(int, Timestamp)
Updates a column in the current row using a java.sql.Timestamp value.
 o updateTimestamp(String, Timestamp)
Updates a column in the current row using a java.sql.Timestamp value.
 o wasNull()
Indicates if the last column read has the value of SQL NULL.

Methods

 o clearWarnings
 public void clearWarnings() throws SQLException
Clears all warnings that have been reported for the result set. After this call, getWarnings() returns null until a new warning is reported for the result set.

Throws: SQLException
If an error occurs.
 o close
 public void close() throws SQLException
Releases the result set's resources immediately instead of waiting for them to be automatically released.

Throws: SQLException
If an error occurs.
 o finalize
 protected void finalize() throws Throwable
Closes the result set if not explicitly closed by the caller.

Throws: Throwable
If an error occurs.
Overrides:
finalize in class Object
 o findColumn
 public int findColumn(String columnName) throws SQLException
Returns the column index for the specified column name.

Parameters:
columnName - The column name.
Returns:
The column index (1-based).
Throws: SQLException
If the result set is not open or the column name is not found.
 o getConcurrency
 public int getConcurrency() throws SQLException
Returns the result set concurrency.

Returns:
The result set concurrency. Valid values are:
  • CONCUR_READ_ONLY
  • CONCUR_UPDATABLE
Throws: SQLException
If the result set is not open.
 o getCursorName
 public String getCursorName() throws SQLException
Returns the name of the SQL cursor in use by the result set. In SQL, results are retrieved through a named cursor. The current row of a result can be updated or deleted using a positioned UPDATE or DELETE statement that references a cursor name.

Returns:
The cursor name.
Throws: SQLException
If the result is not open.
 o getFetchDirection
 public int getFetchDirection() throws SQLException
Returns the fetch direction.

Returns:
The fetch direction. Valid values are:
  • FETCH_FORWARD
  • FETCH_REVERSE
  • FETCH_UNKNOWN
Throws: SQLException
If the result is not open.
 o getFetchSize
 public int getFetchSize() throws SQLException
Returns the fetch size.

Returns:
The fetch size.
Throws: SQLException
If the result is not open.
 o getStatement
 public Statement getStatement() throws SQLException
Returns the statement for this result set.

Returns:
The statement for this result set, or null if the result set was returned by a DatabaseMetaData catalog method.
Throws: SQLException
If an error occurs.
 o getType
 public int getType() throws SQLException
Returns the result set type.

Returns:
The result set type. Valid values are:
  • TYPE_FORWARD_ONLY
  • TYPE_SCROLL_INSENSITIVE
  • .TYPE_SCROLL_SENSITIVE
Throws: SQLException
If the result set is not open.
 o getWarnings
 public SQLWarning getWarnings() throws SQLException
Returns the first warning reported for the result set. Subsequent warnings may be chained to this warning.

Returns:
The first warning or null if no warnings have been reported.
Throws: SQLException
If an error occurs.
 o setFetchDirection
 public void setFetchDirection(int fetchDirection) throws SQLException
Sets the direction in which the rows in a result set are processed.

Parameters:
fetchDirection - The fetch direction for processing rows. Valid values are:
  • FETCH_FORWARD
  • FETCH_REVERSE
  • FETCH_UNKNOWN
The default is the statement's fetch direction.
Throws: 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.
 o setFetchSize
 public void setFetchSize(int fetchSize) throws SQLException
Sets the number of rows to be fetched from the database when more rows are needed. This may be changed at any time. If the value specified is zero, then the driver will choose an appropriate fetch size.

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".

Parameters:
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.
Throws: SQLException
If the result set is not open or the input value is not valid.
 o toString
 public String toString()
Returns the name of the SQL cursor in use by the result set.

Returns:
The cursor name.
Overrides:
toString in class Object
 o absolute
 public boolean absolute(int rowNumber) throws SQLException
Positions the cursor to an absolute row number.

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.

Parameters:
rowNumber - The absolute row number. 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.
Returns:
true if the requested cursor position is valid; false otherwise.
Throws: SQLException
If the result set is not open, the result set is not scrollable, the row number is 0, or an error occurs.
 o afterLast
 public void afterLast() throws SQLException
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.

Throws: SQLException
If the result set is not open, the result set is not scrollable, or an error occurs.
 o beforeFirst
 public void beforeFirst() throws SQLException
Positions the cursor before the first row. If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Throws: SQLException
If the result set is not open, the result set is not scrollable, or an error occurs.
 o first
 public boolean first() throws SQLException
Positions the cursor to the first row. If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Returns:
true if the requested cursor position is valid; false otherwise.
Throws: SQLException
If the result set is not open, the result set is not scrollable, or an error occurs.
 o getRow
 public int getRow() throws SQLException
Returns the current row number.

Returns:
The current row number (1-based). If there is no current row or if the cursor is positioned on the insert row, 0 is returned.
Throws: SQLException
If the result set is not open.
 o isAfterLast
 public boolean isAfterLast() throws SQLException
Indicates if the cursor is positioned after the last row.

Returns:
true if the cursor is positioned after the last row; false if the cursor is not positioned after the last row or if the result set contains no rows.
Throws: SQLException
If the result set is not open.
 o isBeforeFirst
 public boolean isBeforeFirst() throws SQLException
Indicates if the cursor is positioned before the first row.

Returns:
true if the cursor is positioned before the first row; false if the cursor is not positioned before the first row or if the result set contains no rows.
Throws: SQLException
If the result set is not open.
 o isFirst
 public boolean isFirst() throws SQLException
Indicates if the cursor is positioned on the first row.

Returns:
true if the cursor is positioned on the first row; false if the cursor is not positioned on the first row or the row number can not be determined.
Throws: SQLException
If the result set is not open.
 o isLast
 public boolean isLast() throws SQLException
Indicates if the cursor is positioned on the last row.

Returns:
true if the cursor is positioned on the last row; false if the cursor is not positioned on the last row or the row number can not be determined.
Throws: SQLException
If the result set is not open.
 o last
 public boolean last() throws SQLException
Positions the cursor to 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.

Returns:
true if the requested cursor position is valid; false otherwise.
Throws: SQLException
If the result set is not open, the result set is not scrollable, or an error occurs.
 o moveToCurrentRow
 public void moveToCurrentRow() throws SQLException
Positions the cursor to the current row. This is the row where the cursor was positioned before moving it to the insert row. If the cursor is not on the insert row, then this has no effect.

If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Throws: SQLException
If the result set is not open, the result set is not scrollable, or an error occurs.
 o moveToInsertRow
 public void moveToInsertRow() throws SQLException
Positions the cursor to the insert row. If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Throws: SQLException
If the result set is not open, the result set is not scrollable, the result set is not updatable, or an error occurs.
 o next
 public boolean next() throws SQLException
Positions the cursor to the next row. If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Returns:
true if the requested cursor position is valid; false if there are no more rows.
Throws: SQLException
If the result set is not open, or an error occurs.
 o previous
 public boolean previous() throws SQLException
Positions the cursor to the previous row. If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Returns:
true if the requested cursor position is valid; false otherwise.
Throws: SQLException
If the result set is not open, the result set is not scrollable, or an error occurs.
 o refreshRow
 public void refreshRow() throws SQLException
Refreshes the current row from the database and cancels all pending updates that have been made since the last call to updateRow(). This method provides a way for an application to explicitly refetch a row from the database. If an InputStream from the current row is open, it is implicitly closed. In addition, all warnings and pending updates are cleared.

Throws: 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.
 o relative
 public boolean relative(int rowNumber) throws SQLException
Positions the cursor to a relative row number.

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.

Parameters:
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.
Returns:
true if the requested cursor position is valid, false otherwise.
Throws: 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.
 o getArray
 public Array getArray(int columnIndex) throws SQLException
Returns the value of a column as an Array object. DB2 for OS/400 does not support arrays.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: SQLException
Always thrown because DB2 for OS/400 does not support arrays.
 o getArray
 public Array getArray(String columnName) throws SQLException
Returns the value of a column as an Array object. DB2 for OS/400 does not support arrays.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: SQLException
Always thrown because DB2 for OS/400 does not support arrays.
 o getAsciiStream
 public InputStream getAsciiStream(int columnIndex) throws SQLException
Returns the value of a column as a stream of ASCII characters. This can be used to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, CLOB, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getAsciiStream
 public InputStream getAsciiStream(String columnName) throws SQLException
Returns the value of a column as a stream of ASCII characters. This can be used to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, CLOB, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBigDecimal
 public BigDecimal getBigDecimal(int columnIndex) throws SQLException
Returns the value of a column as a BigDecimal object. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBigDecimal
 public BigDecimal getBigDecimal(String columnName) throws SQLException
Returns the value of a column as a BigDecimal object. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBigDecimal
 public BigDecimal getBigDecimal(int columnIndex,
                                 int scale) throws SQLException
Note: getBigDecimal() is deprecated. Use getBigDecimal(int) instead.

Returns the value of a column as a BigDecimal object. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
scale - The number of digits after the decimal.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
See Also:
getBigDecimal
 o getBigDecimal
 public BigDecimal getBigDecimal(String columnName,
                                 int scale) throws SQLException
Note: getBigDecimal() is deprecated. Use getBigDecimal(String) instead.

Returns the value of a column as a BigDecimal object. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
scale - The number of digits after the decimal.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
See Also:
getBigDecimal
 o getBinaryStream
 public InputStream getBinaryStream(int columnIndex) throws SQLException
Returns the value of a column as a stream of uninterpreted bytes. This can be used to get values from columns with SQL types BINARY, VARBINARY, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBinaryStream
 public InputStream getBinaryStream(String columnName) throws SQLException
Returns the value of a column as a stream of uninterpreted bytes. This can be used to get values from columns with SQL types BINARY, VARBINARY, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBlob
 public Blob getBlob(int columnIndex) throws SQLException
Returns the value of a column as a Blob object. This can be used to get values from columns with SQL types BINARY, VARBINARY, and BLOB.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBlob
 public Blob getBlob(String columnName) throws SQLException
Returns the value of a column as a Blob object. This can be used to get values from columns with SQL types BINARY, VARBINARY, and BLOB.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBoolean
 public boolean getBoolean(int columnIndex) throws SQLException
Returns the value of a column as a Java boolean value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or false if the value is SQL NULL.
Throws: 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.
 o getBoolean
 public boolean getBoolean(String columnName) throws SQLException
Returns the value of a column as a Java boolean value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or false if the value is SQL NULL.
Throws: 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.
 o getByte
 public byte getByte(int columnIndex) throws SQLException
Returns the value of a column as a Java byte value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getByte
 public byte getByte(String columnName) throws SQLException
Returns the value of a column as a Java byte value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getBytes
 public byte[] getBytes(int columnIndex) throws SQLException
Returns the value of a column as a Java byte array. This can be used to get values from columns with SQL types BINARY and VARBINARY.

This can also be used to get values from columns with other types. The values are returned in their native AS/400 format. This is not supported for result sets returned by a DatabaseMetaData object.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getBytes
 public byte[] getBytes(String columnName) throws SQLException
Returns the value of a column as a Java byte array. This can be used to get values from columns with SQL types BINARY and VARBINARY.

This can also be used to get values from columns with other types. The values are returned in their native AS/400 format. This is not supported for result sets returned by a DatabaseMetaData object.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getCharacterStream
 public Reader getCharacterStream(int columnIndex) throws SQLException
Returns the value of a column as a character stream. This can be used to to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, CLOB, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getCharacterStream
 public Reader getCharacterStream(String columnName) throws SQLException
Returns the value of a column as a character stream. This can be used to to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, CLOB, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getClob
 public Clob getClob(int columnIndex) throws SQLException
Returns the value of a column as a Clob object. This can be used to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, BLOB, and CLOB.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getClob
 public Clob getClob(String columnName) throws SQLException
Returns the value of a column as a Clob object. This can be used to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, BLOB, and CLOB.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getDate
 public Date getDate(int columnIndex) throws SQLException
Returns the value of a column as a java.sql.Date object using the default calendar. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getDate
 public Date getDate(String columnName) throws SQLException
Returns the value of a column as a java.sql.Date object using the default calendar. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getDate
 public Date getDate(int columnIndex,
                     Calendar calendar) throws SQLException
Returns the value of a column as a java.sql.Date object using a calendar other than the default. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnIndex - The column index (1-based).
calendar - The calendar.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getDate
 public Date getDate(String columnName,
                     Calendar calendar) throws SQLException
Returns the value of a column as a java.sql.Date object using a calendar other than the default. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnName - The column name.
calendar - The calendar.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getDouble
 public double getDouble(int columnIndex) throws SQLException
Returns the value of a column as a Java double value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getDouble
 public double getDouble(String columnName) throws SQLException
Returns the value of a column as a Java double value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getFloat
 public float getFloat(int columnIndex) throws SQLException
Returns the value of a column as a Java float value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getFloat
 public float getFloat(String columnName) throws SQLException
Returns the value of a column as a Java float value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getInt
 public int getInt(int columnIndex) throws SQLException
Returns the value of a column as a Java int value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getInt
 public int getInt(String columnName) throws SQLException
Returns the value of a column as a Java int value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getLong
 public long getLong(int columnIndex) throws SQLException
Returns the value of a column as a Java long value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getLong
 public long getLong(String columnName) throws SQLException
Returns the value of a column as a Java long value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getMetaData
 public ResultSetMetaData getMetaData() throws SQLException
Returns the ResultSetMetaData object that describes the result set's columns.

Returns:
The metadata object.
Throws: SQLException
If an error occurs.
 o getObject
 public Object getObject(int columnIndex) throws SQLException
Returns the value of a column as a Java Object. This can be used to get values from columns with all SQL types. If the column is a user-defined type, then the connection's type map is used to created the object.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getObject
 public Object getObject(String columnName) throws SQLException
Returns the value of a column as a Java Object. This can be used to get values from columns with all SQL types. If the column is a user-defined type, then the connection's type map is used to created the object.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getObject
 public Object getObject(int columnIndex,
                         Map typeMap) throws SQLException
Returns the value of a column as a Java Object.

Parameters:
columnIndex - The column index (1-based).
typeMap - The type map. This is not used.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getObject
 public Object getObject(String columnName,
                         Map typeMap) throws SQLException
Returns the value of a column as a Java Object.

Parameters:
columnName - The column name.
typeMap - The type map. This is not used.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getRef
 public Ref getRef(int columnIndex) throws SQLException
Returns the value of a column as a Ref object. DB2 for OS/400 does not support structured types.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: SQLException
Always thrown because DB2 for OS/400 does not support structured types.
 o getRef
 public Ref getRef(String columnName) throws SQLException
Returns the value of a column as a Ref object. DB2 for OS/400 does not support structured types.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: SQLException
Always thrown because DB2 for OS/400 does not support structured types.
 o getShort
 public short getShort(int columnIndex) throws SQLException
Returns the value of a column as a Java short value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getShort
 public short getShort(String columnName) throws SQLException
Returns the value of a column as a Java short value. This can be used to get values from columns with SQL types SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, CHAR, and VARCHAR.

Parameters:
columnName - The column name.
Returns:
The column value or 0 if the value is SQL NULL.
Throws: 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.
 o getString
 public String getString(int columnIndex) throws SQLException
Returns the value of a column as a String object. This can be used to get values from columns with any SQL type.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getString
 public String getString(String columnName) throws SQLException
Returns the value of a column as a String object. This can be used to get values from columns with any SQL type.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTime
 public Time getTime(int columnIndex) throws SQLException
Returns the value of a column as a java.sql.Time object using the default calendar. This can be used to get values from columns with SQL types CHAR, VARCHAR, TIME, and TIMESTAMP.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTime
 public Time getTime(String columnName) throws SQLException
Returns the value of a column as a java.sql.Time object using the default calendar. This can be used to get values from columns with SQL types CHAR, VARCHAR, TIME, and TIMESTAMP.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTime
 public Time getTime(int columnIndex,
                     Calendar calendar) throws SQLException
Returns the value of a column as a java.sql.Time object using a calendar other than the default. This can be used to get values from columns with SQL types CHAR, VARCHAR, TIME, and TIMESTAMP.

Parameters:
columnIndex - The column index (1-based).
calendar - The calendar.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTime
 public Time getTime(String columnName,
                     Calendar calendar) throws SQLException
Returns the value of a column as a java.sql.Time object using a calendar other than the default. This can be used to get values from columns with SQL types CHAR, VARCHAR, TIME, and TIMESTAMP.

Parameters:
columnName - The column name.
calendar - The calendar.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTimestamp
 public Timestamp getTimestamp(int columnIndex) throws SQLException
Returns the value of a column as a java.sql.Timestamp object using the default calendar. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTimestamp
 public Timestamp getTimestamp(String columnName) throws SQLException
Returns the value of a column as a java.sql.Timestamp object using the default calendar. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTimestamp
 public Timestamp getTimestamp(int columnIndex,
                               Calendar calendar) throws SQLException
Returns the value of a column as a java.sql.Timestamp object using a calendar other than the default. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnIndex - The column index (1-based).
calendar - The calendar.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getTimestamp
 public Timestamp getTimestamp(String columnName,
                               Calendar calendar) throws SQLException
Returns the value of a column as a java.sql.Timestamp object using a calendar other than the default. This can be used to get values from columns with SQL types CHAR, VARCHAR, DATE, and TIMESTAMP.

Parameters:
columnName - The column name.
calendar - The calendar.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
 o getUnicodeStream
 public InputStream getUnicodeStream(int columnIndex) throws SQLException
Note: getUnicodeStream() is deprecated. Use getCharacterStream(int) instead.

Returns the value of a column as a stream of Unicode characters. This can be used to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, CLOB, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnIndex - The column index (1-based).
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
See Also:
getCharacterStream
 o getUnicodeStream
 public InputStream getUnicodeStream(String columnName) throws SQLException
Note: getUnicodeStream() is deprecated. Use getCharacterStream(String) instead.

Returns the value of a column as a stream of Unicode characters. This can be used to get values from columns with SQL types CHAR, VARCHAR, BINARY, VARBINARY, CLOB, and BLOB. All of the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.

Parameters:
columnName - The column name.
Returns:
The column value or null if the value is SQL NULL.
Throws: 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.
See Also:
getCharacterStream
 o wasNull
 public boolean wasNull() throws SQLException
Indicates if the last column read has the value of SQL NULL.

Returns:
true if the value is SQL NULL; false otherwise.
Throws: SQLException
If the result set is not open.
 o cancelRowUpdates
 public void cancelRowUpdates() throws SQLException
Cancels all pending updates that have been made since the last call to updateRow(). If no updates have been made or updateRow() has already been called, then this method has no effect.

Throws: SQLException
If the result set is not open or the result set is not updatable.
 o deleteRow
 public void deleteRow() throws SQLException
Deletes the current row from the result set and the database. After deleting a row, the cursor position is no longer valid, so it must be explicitly repositioned.

Throws: 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.
 o insertRow
 public void insertRow() throws SQLException
Inserts the contents of the insert row into the result set and the database.

Throws: 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.
 o rowDeleted
 public boolean rowDeleted() throws SQLException
Indicates if the current row has been deleted. A result set of type TYPE_SCROLL_INSENSITIVE may contain rows that have been deleted.

Returns:
true if current row has been deleted; false otherwise.
Throws: SQLException
If an error occurs.
 o rowInserted
 public boolean rowInserted() throws SQLException
Indicates if the current row has been inserted. This driver does not support this method.

Returns:
Always false.
Throws: SQLException
If an error occurs.
 o rowUpdated
 public boolean rowUpdated() throws SQLException
Indicates if the current row has been updated. This driver does not support this method.

Returns:
Always false.
Throws: SQLException
If an error occurs.
 o updateAsciiStream
 public void updateAsciiStream(int columnIndex,
                               InputStream columnValue,
                               int length) throws SQLException
Updates a column in the current row using an ASCII stream value. The driver reads the data from the stream as needed until no more bytes are available. The driver converts this to an SQL VARCHAR value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
length - The length.
Throws: 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.
 o updateAsciiStream
 public void updateAsciiStream(String columnName,
                               InputStream columnValue,
                               int length) throws SQLException
Updates a column in the current row using an ASCII stream value. The driver reads the data from the stream as needed until no more bytes are available. The driver converts this to an SQL VARCHAR value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
length - The length.
Throws: 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.
 o updateBigDecimal
 public void updateBigDecimal(int columnIndex,
                              BigDecimal columnValue) throws SQLException
Updates a column in the current row using a BigDecimal value. The driver converts this to an SQL NUMERIC value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateBigDecimal
 public void updateBigDecimal(String columnName,
                              BigDecimal columnValue) throws SQLException
Updates a column in the current row using a BigDecimal value. The driver converts this to an SQL NUMERIC value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateBinaryStream
 public void updateBinaryStream(int columnIndex,
                                InputStream columnValue,
                                int length) throws SQLException
Updates a column in the current row using a binary stream value. The driver reads the data from the stream as needed until no more bytes are available. The driver converts this to an SQL VARBINARY value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
length - The length.
Throws: 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.
 o updateBinaryStream
 public void updateBinaryStream(String columnName,
                                InputStream columnValue,
                                int length) throws SQLException
Updates a column in the current row using a binary stream value. The driver reads the data from the stream as needed until no more bytes are available. The driver converts this to an SQL VARBINARY value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
length - The length.
Throws: 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.
 o updateBoolean
 public void updateBoolean(int columnIndex,
                           boolean columnValue) throws SQLException
Updates a column in the current row using a Java boolean value. The driver converts this to an SQL SMALLINT value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateBoolean
 public void updateBoolean(String columnName,
                           boolean columnValue) throws SQLException
Updates a column in the current row using a Java boolean value. The driver converts this to an SQL SMALLINT value.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateByte
 public void updateByte(int columnIndex,
                        byte columnValue) throws SQLException
Updates a column in the current row using a Java byte value. The driver converts this to an SQL SMALLINT value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateByte
 public void updateByte(String columnName,
                        byte columnValue) throws SQLException
Updates a column in the current row using a Java byte value. The driver converts this to an SQL SMALLINT value.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateBytes
 public void updateBytes(int columnIndex,
                         byte columnValue[]) throws SQLException
Updates a column in the current row using a Java byte array value. The driver converts this to an SQL VARBINARY value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateBytes
 public void updateBytes(String columnName,
                         byte columnValue[]) throws SQLException
Updates a column in the current row using a Java byte array value. The driver converts this to an SQL VARBINARY value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateCharacterStream
 public void updateCharacterStream(int columnIndex,
                                   Reader columnValue,
                                   int length) throws SQLException
Updates a column in the current row using a Reader value. The driver reads the data from the Reader as needed until no more characters are available. The driver converts this to an SQL VARCHAR value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
length - The length.
Throws: 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.
 o updateCharacterStream
 public void updateCharacterStream(String columnName,
                                   Reader columnValue,
                                   int length) throws SQLException
Updates a column in the current row using a Reader value. The driver reads the data from the Reader as needed until no more characters are available. The driver converts this to an SQL VARCHAR value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
length - The length.
Throws: 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.
 o updateDate
 public void updateDate(int columnIndex,
                        Date columnValue) throws SQLException
Updates a column in the current row using a java.sql.Date value. The driver converts this to an SQL DATE value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateDate
 public void updateDate(String columnName,
                        Date columnValue) throws SQLException
Updates a column in the current row using a java.sql.Date value. The driver converts this to an SQL DATE value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateDouble
 public void updateDouble(int columnIndex,
                          double columnValue) throws SQLException
Updates a column in the current row using a Java double value. The driver converts this to an SQL DOUBLE value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateDouble
 public void updateDouble(String columnName,
                          double columnValue) throws SQLException
Updates a column in the current row using a Java double value. The driver converts this to an SQL DOUBLE value.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateFloat
 public void updateFloat(int columnIndex,
                         float columnValue) throws SQLException
Updates a column in the current row using a Java float value. The driver converts this to an SQL REAL value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateFloat
 public void updateFloat(String columnName,
                         float columnValue) throws SQLException
Updates a column in the current row using a Java float value. The driver converts this to an SQL REAL value.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateInt
 public void updateInt(int columnIndex,
                       int columnValue) throws SQLException
Updates a column in the current row using a Java int value. The driver converts this to an SQL INTEGER value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateInt
 public void updateInt(String columnName,
                       int columnValue) throws SQLException
Updates a column in the current row using a Java int value. The driver converts this to an SQL INTEGER value.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateLong
 public void updateLong(int columnIndex,
                        long columnValue) throws SQLException
Updates a column in the current row using a Java long value. If the connected AS/400 supports SQL BIGINT data, the driver converts this to an SQL BIGINT value. Otherwise, the driver converts this to an SQL INTEGER value. SQL BIGINT data is supported on V4R5 and later.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateLong
 public void updateLong(String columnName,
                        long columnValue) throws SQLException
Updates a column in the current row using a Java long value. If the connected AS/400 supports SQL BIGINT data, the driver converts this to an SQL BIGINT value. Otherwise, the driver converts this to an SQL INTEGER value. SQL BIGINT data is supported on V4R5 and later.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateNull
 public void updateNull(int columnIndex) throws SQLException
Updates a column in the current row using SQL NULL.

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.

Parameters:
columnIndex - The column index (1-based).
Throws: 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.
 o updateNull
 public void updateNull(String columnName) throws SQLException
Updates a column in the current row using SQL NULL.

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.

Parameters:
columnName - The column name.
Throws: 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.
 o updateObject
 public void updateObject(int columnIndex,
                          Object columnValue) throws SQLException
Updates a column in the current row using an Object value. The driver converts this to a value of an SQL type, depending on the type of the specified value. The JDBC specification defines a standard mapping from Java types to SQL types. In the cases where an SQL type is not supported by DB2 for OS/400, the next closest matching type is used.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateObject
 public void updateObject(String columnName,
                          Object columnValue) throws SQLException
Updates a column in the current row using an Object value. The driver converts this to a value of an SQL type, depending on the type of the specified value. The JDBC specification defines a standard mapping from Java types to SQL types. In the cases where an SQL type is not supported by DB2 for OS/400, the next closest matching type is used.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateObject
 public void updateObject(int columnIndex,
                          Object columnValue,
                          int scale) throws SQLException
Updates a column in the current row using an Object value. The driver converts this to a value of an SQL type, depending on the type of the specified value. The JDBC specification defines a standard mapping from Java types to SQL types. In the cases where an SQL type is not supported by DB2 for OS/400, the next closest matching type is used.

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.

Parameters:
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.
Throws: 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.
 o updateObject
 public void updateObject(String columnName,
                          Object columnValue,
                          int scale) throws SQLException
Updates a column in the current row using an Object value. The driver converts this to a value of an SQL type, depending on the type of the specified value. The JDBC specification defines a standard mapping from Java types to SQL types. In the cases where an SQL type is not supported by DB2 for OS/400, the next closest matching type is used.

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.

Parameters:
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.
Throws: 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.
 o updateRow
 public void updateRow() throws SQLException
Updates the database with the new contents of the current row.

Throws: 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.
 o updateShort
 public void updateShort(int columnIndex,
                         short columnValue) throws SQLException
Updates a column in the current row using a Java short value. The driver converts this to an SQL SMALLINT value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value.
Throws: 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.
 o updateShort
 public void updateShort(String columnName,
                         short columnValue) throws SQLException
Updates a column in the current row using a Java short value. The driver converts this to an SQL SMALLINT value.

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.

Parameters:
columnName - The column name.
columnValue - The column value.
Throws: 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.
 o updateString
 public void updateString(int columnIndex,
                          String columnValue) throws SQLException
Updates a column in the current row using a String value. The driver converts this to an SQL VARCHAR value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateString
 public void updateString(String columnName,
                          String columnValue) throws SQLException
Updates a column in the current row using a String value. The driver converts this to an SQL VARCHAR value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateTime
 public void updateTime(int columnIndex,
                        Time columnValue) throws SQLException
Updates a column in the current row using a java.sql.Time value. The driver converts this to an SQL TIME value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateTime
 public void updateTime(String columnName,
                        Time columnValue) throws SQLException
Updates a column in the current row using a java.sql.Time value. The driver converts this to an SQL TIME value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateTimestamp
 public void updateTimestamp(int columnIndex,
                             Timestamp columnValue) throws SQLException
Updates a column in the current row using a java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value.

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.

Parameters:
columnIndex - The column index (1-based).
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.
 o updateTimestamp
 public void updateTimestamp(String columnName,
                             Timestamp columnValue) throws SQLException
Updates a column in the current row using a java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value.

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.

Parameters:
columnName - The column name.
columnValue - The column value or null to update the value to SQL NULL.
Throws: 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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index