|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.access.AS400JDBCResultSet
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 case, result sets are always read only regardless of the concurrency set in the statement if connecting to a server running V4R5 or a previous release of OS/400:
In the following case, 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.
The new JDBC 3.0 methods add the ability to retrieve information by column name in addition to column index. Be aware you will see better performance accessing columns by their index rather than accessing them by their name.
Fields inherited from interface java.sql.ResultSet |
CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
Method Summary | |
boolean |
absolute(int rowNumber)
Positions the cursor to an absolute row number. |
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 |
clearWarnings()
Clears all warnings that have been reported for the result set. |
void |
close()
Releases the result set's resources immediately instead of waiting for them to be automatically released. |
void |
deleteRow()
Deletes the current row from the result set and the database. |
protected void |
finalize()
Closes the result set if not explicitly closed by the caller. |
int |
findColumn(java.lang.String columnName)
Returns the column index for the specified column name. |
boolean |
first()
Positions the cursor to the first row. |
java.sql.Array |
getArray(int columnIndex)
Returns the value of a column as an Array object. |
java.sql.Array |
getArray(java.lang.String columnName)
Returns the value of a column as an Array object. |
java.io.InputStream |
getAsciiStream(int columnIndex)
Returns the value of a column as a stream of ASCII characters. |
java.io.InputStream |
getAsciiStream(java.lang.String columnName)
Returns the value of a column as a stream of ASCII characters. |
java.math.BigDecimal |
getBigDecimal(int columnIndex)
Returns the value of a column as a BigDecimal object. |
java.math.BigDecimal |
getBigDecimal(int columnIndex,
int scale)
Deprecated. Use getBigDecimal(int) instead. |
java.math.BigDecimal |
getBigDecimal(java.lang.String columnName)
Returns the value of a column as a BigDecimal object. |
java.math.BigDecimal |
getBigDecimal(java.lang.String columnName,
int scale)
Deprecated. Use getBigDecimal(String) instead. |
java.io.InputStream |
getBinaryStream(int columnIndex)
Returns the value of a column as a stream of uninterpreted bytes. |
java.io.InputStream |
getBinaryStream(java.lang.String columnName)
Returns the value of a column as a stream of uninterpreted bytes. |
java.sql.Blob |
getBlob(int columnIndex)
Returns the value of a column as a Blob object. |
java.sql.Blob |
getBlob(java.lang.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(java.lang.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(java.lang.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(java.lang.String columnName)
Returns the value of a column as a Java byte array. |
java.io.Reader |
getCharacterStream(int columnIndex)
Returns the value of a column as a character stream. |
java.io.Reader |
getCharacterStream(java.lang.String columnName)
Returns the value of a column as a character stream. |
java.sql.Clob |
getClob(int columnIndex)
Returns the value of a column as a Clob object. |
java.sql.Clob |
getClob(java.lang.String columnName)
Returns the value of a column as a Clob object. |
int |
getConcurrency()
Returns the result set concurrency. |
java.lang.String |
getCursorName()
Returns the name of the SQL cursor in use by the result set. |
java.sql.Date |
getDate(int columnIndex)
Returns the value of a column as a java.sql.Date object using the default calendar. |
java.sql.Date |
getDate(int columnIndex,
java.util.Calendar calendar)
Returns the value of a column as a java.sql.Date object using a calendar other than the default. |
java.sql.Date |
getDate(java.lang.String columnName)
Returns the value of a column as a java.sql.Date object using the default calendar. |
java.sql.Date |
getDate(java.lang.String columnName,
java.util.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(java.lang.String columnName)
Returns the value of a column as a Java double value. |
int |
getFetchDirection()
Returns the fetch direction. |
int |
getFetchSize()
Returns the fetch size. |
float |
getFloat(int columnIndex)
Returns the value of a column as a Java float value. |
float |
getFloat(java.lang.String columnName)
Returns the value of a column as a Java float value. |
int |
getInt(int columnIndex)
Returns the value of a column as a Java int value. |
int |
getInt(java.lang.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(java.lang.String columnName)
Returns the value of a column as a Java long value. |
java.sql.ResultSetMetaData |
getMetaData()
Returns the ResultSetMetaData object that describes the result set's columns. |
java.lang.Object |
getObject(int columnIndex)
Returns the value of a column as a Java Object. |
java.lang.Object |
getObject(int columnIndex,
java.util.Map typeMap)
Returns the value of a column as a Java Object. |
java.lang.Object |
getObject(java.lang.String columnName)
Returns the value of a column as a Java Object. |
java.lang.Object |
getObject(java.lang.String columnName,
java.util.Map typeMap)
Returns the value of a column as a Java Object. |
java.sql.Ref |
getRef(int columnIndex)
Returns the value of a column as a Ref object. |
java.sql.Ref |
getRef(java.lang.String columnName)
Returns the value of a column as a Ref object. |
int |
getRow()
Returns the current row number, or 0. |
short |
getShort(int columnIndex)
Returns the value of a column as a Java short value. |
short |
getShort(java.lang.String columnName)
Returns the value of a column as a Java short value. |
java.sql.Statement |
getStatement()
Returns the statement for this result set. |
java.lang.String |
getString(int columnIndex)
Returns the value of a column as a String object. |
java.lang.String |
getString(java.lang.String columnName)
Returns the value of a column as a String object. |
java.sql.Time |
getTime(int columnIndex)
Returns the value of a column as a java.sql.Time object using the default calendar. |
java.sql.Time |
getTime(int columnIndex,
java.util.Calendar calendar)
Returns the value of a column as a java.sql.Time object using a calendar other than the default. |
java.sql.Time |
getTime(java.lang.String columnName)
Returns the value of a column as a java.sql.Time object using the default calendar. |
java.sql.Time |
getTime(java.lang.String columnName,
java.util.Calendar calendar)
Returns the value of a column as a java.sql.Time object using a calendar other than the default. |
java.sql.Timestamp |
getTimestamp(int columnIndex)
Returns the value of a column as a java.sql.Timestamp object using the default calendar. |
java.sql.Timestamp |
getTimestamp(int columnIndex,
java.util.Calendar calendar)
Returns the value of a column as a java.sql.Timestamp object using a calendar other than the default. |
java.sql.Timestamp |
getTimestamp(java.lang.String columnName)
Returns the value of a column as a java.sql.Timestamp object using the default calendar. |
java.sql.Timestamp |
getTimestamp(java.lang.String columnName,
java.util.Calendar calendar)
Returns the value of a column as a java.sql.Timestamp object using a calendar other than the default. |
int |
getType()
Returns the result set type. |
java.io.InputStream |
getUnicodeStream(int columnIndex)
Deprecated. Use getCharacterStream(int) instead. |
java.io.InputStream |
getUnicodeStream(java.lang.String columnName)
Deprecated. Use getCharacterStream(String) instead. |
java.net.URL |
getURL(int columnIndex)
Returns the value of an SQL DATALINK output parameter as a java.net.URL object. |
java.net.URL |
getURL(java.lang.String columnName)
Returns the value of an SQL DATALINK output parameter as a java.net.URL object. |
java.sql.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 |
isFirst()
Indicates if the cursor is positioned on the first row. |
boolean |
isLast()
Indicates if the cursor is positioned on the last row. |
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. |
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 |
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. |
java.lang.String |
toString()
Returns the name of the SQL cursor in use by the result set. |
void |
updateArray(int columnIndex,
java.sql.Array columnValue)
Updates the value of a column as an Array object. |
void |
updateArray(java.lang.String columnName,
java.sql.Array columnValue)
Updates the value of a column as an Array object. |
void |
updateAsciiStream(int columnIndex,
java.io.InputStream columnValue,
int length)
Updates a column in the current row using an ASCII stream value. |
void |
updateAsciiStream(java.lang.String columnName,
java.io.InputStream columnValue,
int length)
Updates a column in the current row using an ASCII stream value. |
void |
updateBigDecimal(int columnIndex,
java.math.BigDecimal columnValue)
Updates a column in the current row using a BigDecimal value. |
void |
updateBigDecimal(java.lang.String columnName,
java.math.BigDecimal columnValue)
Updates a column in the current row using a BigDecimal value. |
void |
updateBinaryStream(int columnIndex,
java.io.InputStream columnValue,
int length)
Updates a column in the current row using a binary stream value. |
void |
updateBinaryStream(java.lang.String columnName,
java.io.InputStream columnValue,
int length)
Updates a column in the current row using a binary stream value. |
void |
updateBlob(int columnIndex,
java.sql.Blob columnValue)
Updates a column in the current row using a Java Blob value. |
void |
updateBlob(java.lang.String columnName,
java.sql.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(java.lang.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(java.lang.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(java.lang.String columnName,
byte[] columnValue)
Updates a column in the current row using a Java byte array value. |
void |
updateCharacterStream(int columnIndex,
java.io.Reader columnValue,
int length)
Updates a column in the current row using a Reader value. |
void |
updateCharacterStream(java.lang.String columnName,
java.io.Reader columnValue,
int length)
Updates a column in the current row using a Reader value. |
void |
updateClob(int columnIndex,
java.sql.Clob columnValue)
Updates a column in the current row using a Java Clob value. |
void |
updateClob(java.lang.String columnName,
java.sql.Clob columnValue)
Updates a column in the current row using a Java Clob value. |
void |
updateDate(int columnIndex,
java.sql.Date columnValue)
Updates a column in the current row using a java.sql.Date value. |
void |
updateDate(java.lang.String columnName,
java.sql.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String columnName,
long columnValue)
Updates a column in the current row using a Java long value. |
void |
updateNull(int columnIndex)
Updates a column in the current row using SQL NULL. |
void |
updateNull(java.lang.String columnName)
Updates a column in the current row using SQL NULL. |
void |
updateObject(int columnIndex,
java.lang.Object columnValue)
Updates a column in the current row using an Object value. |
void |
updateObject(int columnIndex,
java.lang.Object columnValue,
int scale)
Updates a column in the current row using an Object value. |
void |
updateObject(java.lang.String columnName,
java.lang.Object columnValue)
Updates a column in the current row using an Object value. |
void |
updateObject(java.lang.String columnName,
java.lang.Object columnValue,
int scale)
Updates a column in the current row using an Object value. |
void |
updateRef(int columnIndex,
java.sql.Ref columnValue)
Updates the value of an SQL REF output parameter as a Ref value. |
void |
updateRef(java.lang.String columnName,
java.sql.Ref columnValue)
Updates the value of an SQL REF output parameter as a Ref value. |
void |
updateRow()
Updates the database with the new contents of the current row. |
void |
updateShort(int columnIndex,
short columnValue)
Updates a column in the current row using a Java short value. |
void |
updateShort(java.lang.String columnName,
short columnValue)
Updates a column in the current row using a Java short value. |
void |
updateString(int columnIndex,
java.lang.String columnValue)
Updates a column in the current row using a String value. |
void |
updateString(java.lang.String columnName,
java.lang.String columnValue)
Updates a column in the current row using a String value. |
void |
updateTime(int columnIndex,
java.sql.Time columnValue)
Updates a column in the current row using a java.sql.Time value. |
void |
updateTime(java.lang.String columnName,
java.sql.Time columnValue)
Updates a column in the current row using a java.sql.Time value. |
void |
updateTimestamp(int columnIndex,
java.sql.Timestamp columnValue)
Updates a column in the current row using a java.sql.Timestamp value. |
void |
updateTimestamp(java.lang.String columnName,
java.sql.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. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public void close() throws java.sql.SQLException
close
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- If an error occurs.public int findColumn(java.lang.String columnName) throws java.sql.SQLException
findColumn
in interface java.sql.ResultSet
columnName
- The column name.java.sql.SQLException
- If the result set is not open
or the column name is not found.public int getConcurrency() throws java.sql.SQLException
getConcurrency
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public java.lang.String getCursorName() throws java.sql.SQLException
Cursor names are case sensitive. However, when using a cursor name within other SQL positioned UPDATE or DELETE statements, the cursor name will be uppercased. If you use a cursor name with lowercase characters, you need to enclose it in double quotes when referring to it in other SQL statements.
getCursorName
in interface java.sql.ResultSet
java.sql.SQLException
- If the result is not open.public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.ResultSet
java.sql.SQLException
- If the result is not open.public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface java.sql.ResultSet
java.sql.SQLException
- If the result is not open.public java.sql.Statement getStatement() throws java.sql.SQLException
getStatement
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public int getType() throws java.sql.SQLException
getType
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public java.net.URL getURL(int columnIndex) throws java.sql.SQLException
columnIndex
- The column index (1-based).java.sql.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 java.net.URL getURL(java.lang.String columnName) throws java.sql.SQLException
columnName
- The column name.java.sql.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 java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public void setFetchDirection(int fetchDirection) throws java.sql.SQLException
setFetchDirection
in interface java.sql.ResultSet
fetchDirection
- The fetch direction for processing rows.
Valid values are:
java.sql.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 java.sql.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 java.sql.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.java.sql.SQLException
- If the result set is not open
or the input value is not valid.public java.lang.String toString()
toString
in class java.lang.Object
public boolean absolute(int rowNumber) throws java.sql.SQLException
Attempting to move any number of positions before the first row positions the cursor to 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 java.sql.ResultSet
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.java.sql.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 afterLast() throws java.sql.SQLException
afterLast
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void beforeFirst() throws java.sql.SQLException
beforeFirst
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public boolean first() throws java.sql.SQLException
first
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public int getRow() throws java.sql.SQLException
0 is returned if the cursor is not on a valid row (such as before the first row, after the last row, or on the insert row), or if the result set is empty.
This method may be slow if cursor movement based on the end of the result set is used. Methods such as last(), afterLast() and absolute() with a negative value will move the cursor based on the end of the result set. This method will be slow in these cases because internally the method must get every row to determine how many rows are in the result set before calculating the current row. The server does not know how many rows are in the result set until every row is touched. That is why this method may start at the highest row retrieve so far, then do next() until the last row is retrieved.
Once the maximum number of rows in the result set is determined, it does not change until the result set is closed.
getRow
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public boolean isAfterLast() throws java.sql.SQLException
isAfterLast
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public boolean isBeforeFirst() throws java.sql.SQLException
isBeforeFirst
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public boolean isFirst() throws java.sql.SQLException
isFirst
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public boolean isLast() throws java.sql.SQLException
isLast
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public boolean last() throws java.sql.SQLException
last
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void moveToCurrentRow() throws java.sql.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 java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void moveToInsertRow() throws java.sql.SQLException
moveToInsertRow
in interface java.sql.ResultSet
java.sql.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 java.sql.SQLException
next
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
or an error occurs.public boolean previous() throws java.sql.SQLException
previous
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open,
the result set is not scrollable,
or an error occurs.public void refreshRow() throws java.sql.SQLException
refreshRow
in interface java.sql.ResultSet
java.sql.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 java.sql.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 java.sql.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.java.sql.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 java.sql.Array getArray(int columnIndex) throws java.sql.SQLException
getArray
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support arrays.public java.sql.Array getArray(java.lang.String columnName) throws java.sql.SQLException
getArray
in interface java.sql.ResultSet
columnName
- The column name.java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support arrays.public java.io.InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException
getAsciiStream
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.io.InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException
getAsciiStream
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.math.BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.math.BigDecimal getBigDecimal(java.lang.String columnName) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.math.BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).scale
- The number of digits after the decimal.java.sql.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 java.math.BigDecimal getBigDecimal(java.lang.String columnName, int scale) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
columnName
- The column name.scale
- The number of digits after the decimal.java.sql.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 java.io.InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException
getBinaryStream
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.io.InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException
getBinaryStream
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Blob getBlob(int columnIndex) throws java.sql.SQLException
getBlob
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.sql.Blob getBlob(java.lang.String columnName) throws java.sql.SQLException
getBlob
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.SQLException
getBoolean
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getBoolean
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.SQLException
getByte
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getByte
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.SQLException
This can also be used to get values from columns with other types. The values are returned in their native OS/400 format. This is not supported for result sets returned by a DatabaseMetaData object.
getBytes
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
This can also be used to get values from columns with other types. The values are returned in their native OS/400 format. This is not supported for result sets returned by a DatabaseMetaData object.
getBytes
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.io.Reader getCharacterStream(int columnIndex) throws java.sql.SQLException
getCharacterStream
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.io.Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException
getCharacterStream
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Clob getClob(int columnIndex) throws java.sql.SQLException
getClob
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.sql.Clob getClob(java.lang.String columnName) throws java.sql.SQLException
getClob
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Date getDate(int columnIndex) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.sql.Date getDate(java.lang.String columnName) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Date getDate(int columnIndex, java.util.Calendar calendar) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).calendar
- The calendar.java.sql.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 java.sql.Date getDate(java.lang.String columnName, java.util.Calendar calendar) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
columnName
- The column name.calendar
- The calendar.java.sql.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 java.sql.SQLException
getDouble
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getDouble
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 float getFloat(int columnIndex) throws java.sql.SQLException
getFloat
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getFloat
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.SQLException
getInt
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getInt
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.SQLException
getLong
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getLong
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public java.lang.Object getObject(int columnIndex) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.lang.Object getObject(java.lang.String columnName) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.lang.Object getObject(int columnIndex, java.util.Map typeMap) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).typeMap
- The type map. This is not used.java.sql.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 java.lang.Object getObject(java.lang.String columnName, java.util.Map typeMap) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
columnName
- The column name.typeMap
- The type map. This is not used.java.sql.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 java.sql.Ref getRef(int columnIndex) throws java.sql.SQLException
getRef
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support structured types.public java.sql.Ref getRef(java.lang.String columnName) throws java.sql.SQLException
getRef
in interface java.sql.ResultSet
columnName
- The column name.java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support structured types.public short getShort(int columnIndex) throws java.sql.SQLException
getShort
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.SQLException
getShort
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.lang.String getString(int columnIndex) throws java.sql.SQLException
getString
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.lang.String getString(java.lang.String columnName) throws java.sql.SQLException
getString
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Time getTime(int columnIndex) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.sql.Time getTime(java.lang.String columnName) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Time getTime(int columnIndex, java.util.Calendar calendar) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).calendar
- The calendar.java.sql.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 java.sql.Time getTime(java.lang.String columnName, java.util.Calendar calendar) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
columnName
- The column name.calendar
- The calendar.java.sql.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 java.sql.Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.sql.Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 java.sql.Timestamp getTimestamp(int columnIndex, java.util.Calendar calendar) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).calendar
- The calendar.java.sql.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 java.sql.Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar calendar) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
columnName
- The column name.calendar
- The calendar.java.sql.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 java.io.InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException
getUnicodeStream
in interface java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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 java.io.InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException
getUnicodeStream
in interface java.sql.ResultSet
columnName
- The column name.java.sql.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 boolean wasNull() throws java.sql.SQLException
wasNull
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open.public void cancelRowUpdates() throws java.sql.SQLException
cancelRowUpdates
in interface java.sql.ResultSet
java.sql.SQLException
- If the result set is not open
or the result set is not updatable.public void deleteRow() throws java.sql.SQLException
deleteRow
in interface java.sql.ResultSet
java.sql.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 insertRow() throws java.sql.SQLException
insertRow
in interface java.sql.ResultSet
java.sql.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 rowDeleted() throws java.sql.SQLException
rowDeleted
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public boolean rowInserted() throws java.sql.SQLException
rowInserted
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public boolean rowUpdated() throws java.sql.SQLException
rowUpdated
in interface java.sql.ResultSet
java.sql.SQLException
- If an error occurs.public void updateArray(int columnIndex, java.sql.Array columnValue) throws java.sql.SQLException
columnIndex
- The column index (1-based).java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support arrays.public void updateArray(java.lang.String columnName, java.sql.Array columnValue) throws java.sql.SQLException
columnIndex
- The column name.java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support arrays.public void updateAsciiStream(int columnIndex, java.io.InputStream columnValue, int length) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.java.sql.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(java.lang.String columnName, java.io.InputStream columnValue, int length) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.java.sql.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, java.math.BigDecimal columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, java.math.BigDecimal columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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, java.io.InputStream columnValue, int length) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.java.sql.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(java.lang.String columnName, java.io.InputStream columnValue, int length) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.java.sql.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 updateBoolean(int columnIndex, boolean columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, boolean columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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 updateBlob(int columnIndex, java.sql.Blob columnValue) throws java.sql.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.
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, java.sql.Blob columnValue) throws java.sql.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.
columnName
- The column name.columnValue
- The column value.java.sql.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(int columnIndex, byte columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, byte columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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 java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, byte[] columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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, java.io.Reader columnValue, int length) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.java.sql.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(java.lang.String columnName, java.io.Reader columnValue, int length) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.length
- The length.java.sql.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, java.sql.Clob columnValue) throws java.sql.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.
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, java.sql.Clob columnValue) throws java.sql.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.
columnName
- The column name.columnValue
- The column value.java.sql.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, java.sql.Date columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, java.sql.Date columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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 java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, double columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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 java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, float columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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 java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, int columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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 java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, long columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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 java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).java.sql.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(java.lang.String columnName) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.java.sql.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, java.lang.Object columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, java.lang.Object columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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, java.lang.Object columnValue, int scale) throws java.sql.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 java.sql.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.java.sql.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(java.lang.String columnName, java.lang.Object columnValue, int scale) throws java.sql.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 java.sql.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.java.sql.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 updateRef(int columnIndex, java.sql.Ref columnValue) throws java.sql.SQLException
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support REFs.public void updateRef(java.lang.String columnName, java.sql.Ref columnValue) throws java.sql.SQLException
columnIndex
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.SQLException
- Always thrown because DB2
UDB for iSeries does not support REFs.public void updateRow() throws java.sql.SQLException
updateRow
in interface java.sql.ResultSet
java.sql.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 updateShort(int columnIndex, short columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value.java.sql.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(java.lang.String columnName, short columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value.java.sql.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, java.lang.String columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, java.lang.String columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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, java.sql.Time columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, java.sql.Time columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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, java.sql.Timestamp columnValue) throws java.sql.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 java.sql.ResultSet
columnIndex
- The column index (1-based).columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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(java.lang.String columnName, java.sql.Timestamp columnValue) throws java.sql.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 java.sql.ResultSet
columnName
- The column name.columnValue
- The column value or null to update
the value to SQL NULL.java.sql.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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |