Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ResultSet

public interface ResultSet
implements Wrapper, AutoCloseable

java.sql.ResultSet
Known Indirect Subclasses


An interface for an object which represents a database table entry, returned as the result of the query to the database.

ResultSets have a cursor which points to the current data table row. When the ResultSet is created, the cursor's location is one position ahead of the first row. To move the cursor to the first and consecutive rows, use the next method. The next method returns true as long as there are more rows in the ResultSet, otherwise it returns false.

The default type of ResultSet can not be updated and its cursor can only advance forward through the rows of data. This means that it is only possible to read through it once. However, other kinds of ResultSet are implemented: an updatable type and also types where the cursor can be scrolled forward and backward through the rows of data. How such a ResultSet is created is demonstrated in the following example:

The ResultSet interface provides a series of methods for retrieving data from columns in the current row, such as getDate and getFloat. The columns are retrieved either by their index number (starting at 1) or by their name - there are separate methods for both techniques of column addressing. The column names are case insensitive. If several columns have the same name, then the getter methods use the first matching column. This means that if column names are used, it is not possible to guarantee that the name will retrieve data from the intended column - for certainty it is better to use column indexes. Ideally the columns should be read left-to-right and read once only, since not all databases are optimized to handle other techniques of reading the data.

When reading data via the appropriate getter methods, the JDBC driver maps the SQL data retrieved from the database to the Java type implied by the method invoked by the application. The JDBC specification has a table for the mappings from SQL types to Java types.

There are also methods for writing data into the ResultSet, such as updateInt and updateString. The update methods can be used either to modify the data of an existing row or to insert new data rows into the ResultSet . Modification of existing data involves moving the cursor to the row which needs modification and then using the update methods to modify the data, followed by calling the ResultSet.updateRow method. For insertion of new rows, the cursor is first moved to a special row called the Insert Row, data is added using the update methods, followed by calling the ResultSet.insertRow method.

A ResultSet is closed if the statement which generated it closes, the statement is executed again, or the same statement's next ResultSet is retrieved (if the statement returned of multiple results).

Summary

Constants

int CLOSE_CURSORS_AT_COMMIT

A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked.

int CONCUR_READ_ONLY

A constant used to indicate the concurrency mode for a ResultSet object that cannot be updated.

int CONCUR_UPDATABLE

A constant used to indicate the concurrency mode for a ResultSet object that can be updated.

int FETCH_FORWARD

A constant used to indicate processing of the rows of a ResultSet in the forward direction, first to last.

int FETCH_REVERSE

A constant used to indicate processing of the rows of a ResultSet in the reverse direction, last to first.

int FETCH_UNKNOWN

A constant used to indicate that the order of processing of the rows of a ResultSet is unknown.

int HOLD_CURSORS_OVER_COMMIT

A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked.

int TYPE_FORWARD_ONLY

A constant used to indicate a ResultSet object whose cursor can only move forward.

int TYPE_SCROLL_INSENSITIVE

A constant used to indicate a ResultSet object which is scrollable but is insensitive to changes made by others.

int TYPE_SCROLL_SENSITIVE

A constant used to indicate a ResultSet object which is scrollable and sensitive to changes made by others.

Public methods

abstract boolean absolute(int row)

Moves the cursor to a specified row number in the ResultSet.

abstract void afterLast()

Moves the cursor to the end of the ResultSet, after the last row.

abstract void beforeFirst()

Moves the cursor to the start of the ResultSet, before the first row.

abstract void cancelRowUpdates()

Cancels any updates made to the current row in the ResultSet.

abstract void clearWarnings()

Clears all warnings related to this ResultSet.

abstract void close()

Releases this ResultSet's database and JDBC resources.

abstract void deleteRow()

Deletes the current row from the ResultSet and from the underlying database.

abstract int findColumn(String columnName)

Gets the index number for a column in the ResultSet from the provided column name.

abstract boolean first()

Shifts the cursor position to the first row in the ResultSet.

abstract Array getArray(int columnIndex)

Gets the content of a column specified by column index in the current row of this ResultSet as a java.sql.Array.

abstract Array getArray(String colName)

Gets the value of a column specified by column name as a java.sql.Array.

abstract InputStream getAsciiStream(int columnIndex)

Gets the value of a column specified by column index as an ASCII character stream.

abstract InputStream getAsciiStream(String columnName)

Gets the value of a column specified by column name as an ASCII character stream.

abstract BigDecimal getBigDecimal(String columnName)

Gets the value of a column specified by column name, as a java.math.BigDecimal.

abstract BigDecimal getBigDecimal(int columnIndex, int scale)

This method was deprecated in API level 1. Use getBigDecimal(int) or getBigDecimal(String) instead.

abstract BigDecimal getBigDecimal(int columnIndex)

Gets the value of a column specified by column index as a java.math.BigDecimal.

abstract BigDecimal getBigDecimal(String columnName, int scale)

This method was deprecated in API level 1. Use getBigDecimal(int) or getBigDecimal(String) instead.

abstract InputStream getBinaryStream(int columnIndex)

Gets the value of a column specified by column index as a binary stream.

abstract InputStream getBinaryStream(String columnName)

Gets the value of a column specified by column name as a binary stream.

abstract Blob getBlob(String columnName)

Gets the value of a column specified by column name, as a java.sql.Blob object.

abstract Blob getBlob(int columnIndex)

Gets the value of a column specified by column index as a java.sql.Blob object.

abstract boolean getBoolean(int columnIndex)

Gets the value of a column specified by column index as a boolean .

abstract boolean getBoolean(String columnName)

Gets the value of a column specified by column name, as a boolean .

abstract byte getByte(String columnName)

Gets the value of a column specified by column name as a byte.

abstract byte getByte(int columnIndex)

Gets the value of a column specified by column index as a byte.

abstract byte[] getBytes(int columnIndex)

Gets the value of a column specified by column index as a byte array.

abstract byte[] getBytes(String columnName)

Gets the value of a column specified by column name as a byte array.

abstract Reader getCharacterStream(String columnName)

Gets the value of a column specified by column name as a java.io.Reader object.

abstract Reader getCharacterStream(int columnIndex)

Gets the value of a column specified by column index as a java.io.Reader object.

abstract Clob getClob(int columnIndex)

Gets the value of a column specified by column index as a java.sql.Clob.

abstract Clob getClob(String colName)

Gets the value of a column specified by column name as a java.sql.Clob.

abstract int getConcurrency()

Gets the concurrency mode of this ResultSet.

abstract String getCursorName()

Gets the name of the SQL cursor of this ResultSet.

abstract Date getDate(int columnIndex, Calendar cal)

Gets the value of a column specified by column index as a java.sql.Date.

abstract Date getDate(int columnIndex)

Gets the value of a column specified by column index as a java.sql.Date.

abstract Date getDate(String columnName, Calendar cal)

Gets the value of a column specified by column name, as a java.sql.Date object.

abstract Date getDate(String columnName)

Gets the value of a column specified by column name as a java.sql.Date.

abstract double getDouble(String columnName)

Gets the value of a column specified by column name as a double value.

abstract double getDouble(int columnIndex)

Gets the value of a column specified by column index as a double value.

abstract int getFetchDirection()

Gets the direction in which rows are fetched for this ResultSet object.

abstract int getFetchSize()

Gets the fetch size (in number of rows) for this ResultSet.

abstract float getFloat(int columnIndex)

Gets the value of a column specified by column index as a float value.

abstract float getFloat(String columnName)

Gets the value of a column specified by column name as a float value.

abstract int getHoldability()

Returns the holdability of this result set: HOLD_CURSORS_OVER_COMMIT or CLOSE_CURSORS_AT_COMMIT.

abstract int getInt(String columnName)

Gets the value of a column specified by column name, as an int value.

abstract int getInt(int columnIndex)

Gets the value of a column specified by column index as an int value.

abstract long getLong(String columnName)

Gets the value of a column specified by column name, as a long value.

abstract long getLong(int columnIndex)

Gets the value of a column specified by column index as a long value.

abstract ResultSetMetaData getMetaData()

Gets the metadata for this ResultSet.

abstract Reader getNCharacterStream(int columnIndex)

Returns a Reader corresponding to the value at the 1-based columnIndex.

abstract Reader getNCharacterStream(String columnLabel)

Returns a Reader corresponding to the value in the named column.

abstract NClob getNClob(String columnLabel)

Returns an NClob corresponding to the value in the named column.

abstract NClob getNClob(int columnIndex)

Returns an NClob corresponding to the value at the 1-based columnIndex.

abstract String getNString(String columnLabel)

Returns a String corresponding to the value in the named column.

abstract String getNString(int columnIndex)

Returns a String corresponding to the value at the 1-based columnIndex.

abstract Object getObject(String columnName, Map<StringClass<?>> map)

Gets the value of a column specified by column name as a Java Object.

abstract Object getObject(int columnIndex, Map<StringClass<?>> map)

Gets the value of a column specified by column index as a Java Object.

abstract Object getObject(String columnName)

Gets the value of a specified column as a Java Object.

abstract Object getObject(int columnIndex)

Gets the value of a specified column as a Java Object.

abstract Ref getRef(String colName)

Gets the value of a column specified by column name as a Java java.sql.Ref.

abstract Ref getRef(int columnIndex)

Gets the value of a column specified by column index as a Java java.sql.Ref.

abstract int getRow()

Gets the number of the current row in the ResultSet.

abstract RowId getRowId(String columnLabel)

Returns a RowId corresponding to the SQL ROWID at the named column.

abstract RowId getRowId(int columnIndex)

Returns a RowId corresponding to the SQL ROWID at the 1-based columnIndex.

abstract SQLXML getSQLXML(String columnLabel)

Returns an SQLXML corresponding to the value in the named column.

abstract SQLXML getSQLXML(int columnIndex)

Returns an SQLXML corresponding to the value at the 1-based columnIndex.

abstract short getShort(String columnName)

Gets the value of a column specified by column name, as a short value.

abstract short getShort(int columnIndex)

Gets the value of a column specified by column index as a short value.

abstract Statement getStatement()

Gets the statement that produced this ResultSet.

abstract String getString(int columnIndex)

Gets the value of a column specified by column index as a String.

abstract String getString(String columnName)

Gets the value of a column specified by column name, as a String.

abstract Time getTime(String columnName, Calendar cal)

Gets the value of a column specified by column index, as a java.sql.Time value.

abstract Time getTime(String columnName)

Gets the value of a column specified by column name, as a java.sql.Time value.

abstract Time getTime(int columnIndex, Calendar cal)

Gets the value of a column specified by column index as a java.sql.Time value.

abstract Time getTime(int columnIndex)

Gets the value of a column specified by column index as a java.sql.Time value.

abstract Timestamp getTimestamp(int columnIndex, Calendar cal)

Gets the value of a column specified by column index, as a java.sql.Timestamp value.

abstract Timestamp getTimestamp(String columnName)

Gets the value of a column specified by column name, as a java.sql.Timestamp value.

abstract Timestamp getTimestamp(String columnName, Calendar cal)

Gets the value of a column specified by column name, as a java.sql.Timestamp value.

abstract Timestamp getTimestamp(int columnIndex)

Gets the value of a column specified by column index as a java.sql.Timestamp value.

abstract int getType()

Gets the type of the ResultSet.

abstract URL getURL(int columnIndex)

Gets the value of a column specified by column index as a java.net.URL.

abstract URL getURL(String columnName)

Gets the value of a column specified by column name as a java.net.URL object.

abstract InputStream getUnicodeStream(int columnIndex)

This method was deprecated in API level 1. Use getCharacterStream(int) instead.

abstract InputStream getUnicodeStream(String columnName)

This method was deprecated in API level 1. Use getCharacterStream(int) instead.

abstract SQLWarning getWarnings()

Gets the first warning generated by calls on this ResultSet.

abstract void insertRow()

Insert the insert row into the ResultSet and into the underlying database.

abstract boolean isAfterLast()

Gets if the cursor is after the last row of the ResultSet.

abstract boolean isBeforeFirst()

Gets if the cursor is before the first row of the ResultSet.

abstract boolean isClosed()

Returns true if this result set has been closed, false otherwise.

abstract boolean isFirst()

Gets if the cursor is on the first row of the ResultSet.

abstract boolean isLast()

Gets if the cursor is on the last row of the ResultSet

abstract boolean last()

Shifts the cursor position to the last row of the ResultSet.

abstract void moveToCurrentRow()

Moves the cursor to the remembered position, namely the row that was the current row before a call to moveToInsertRow.

abstract void moveToInsertRow()

Moves the cursor position to the Insert Row.

abstract boolean next()

Shifts the cursor position down one row in this ResultSet object.

abstract boolean previous()

Relocates the cursor position to the preceding row in this ResultSet.

abstract void refreshRow()

Refreshes the current row with its most up to date value in the database.

abstract boolean relative(int rows)

Moves the cursor position up or down by a specified number of rows.

abstract boolean rowDeleted()

Indicates whether a row has been deleted.

abstract boolean rowInserted()

Indicates whether the current row has had an insertion operation.

abstract boolean rowUpdated()

Indicates whether the current row has been updated.

abstract void setFetchDirection(int direction)

Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object.

abstract void setFetchSize(int rows)

Indicates the number of rows to fetch from the database when extra rows are required for this ResultSet.

abstract void updateArray(int columnIndex, Array x)

Updates a column specified by a column index with a java.sql.Array value.

abstract void updateArray(String columnName, Array x)

Updates a column specified by a column name with a java.sql.Array value.

abstract void updateAsciiStream(String columnName, InputStream x, int length)

Updates a column specified by a column name with an Ascii stream value.

abstract void updateAsciiStream(int columnIndex, InputStream x, long length)

Updates the value at the 1-based columnIndex.

abstract void updateAsciiStream(String columnLabel, InputStream x, long length)

Updates the value in the named column.

abstract void updateAsciiStream(String columnLabel, InputStream x)

Updates the value in the named column.

abstract void updateAsciiStream(int columnIndex, InputStream x)

Updates the value at the 1-based columnIndex.

abstract void updateAsciiStream(int columnIndex, InputStream x, int length)

Updates a column specified by a column index with an ASCII stream value.

abstract void updateBigDecimal(int columnIndex, BigDecimal x)

Updates a column specified by a column index with a java.sql.BigDecimal value.

abstract void updateBigDecimal(String columnName, BigDecimal x)

Updates a column specified by a column name with a java.sql.BigDecimal value.

abstract void updateBinaryStream(int columnIndex, InputStream x)

Updates the value at the 1-based columnIndex.

abstract void updateBinaryStream(int columnIndex, InputStream x, long length)

Updates the value at the 1-based columnIndex.

abstract void updateBinaryStream(String columnLabel, InputStream x, long length)

Updates the value in the named column.

abstract void updateBinaryStream(int columnIndex, InputStream x, int length)

Updates a column specified by a column index with a binary stream value.

abstract void updateBinaryStream(String columnLabel, InputStream x)

Updates the value in the named column.

abstract void updateBinaryStream(String columnName, InputStream x, int length)

Updates a column specified by a column name with a binary stream value.

abstract void updateBlob(int columnIndex, Blob x)

Updates a column specified by a column index with a java.sql.Blob value.

abstract void updateBlob(String columnLabel, InputStream inputStream)

Updates the value in the named column.

abstract void updateBlob(String columnLabel, InputStream inputStream, long length)

Updates the value in the named column.

abstract void updateBlob(int columnIndex, InputStream inputStream)

Updates the value at the 1-based columnIndex.

abstract void updateBlob(int columnIndex, InputStream inputStream, long length)

Updates the value at the 1-based columnIndex.

abstract void updateBlob(String columnName, Blob x)

Updates a column specified by a column name with a java.sql.Blob value.

abstract void updateBoolean(int columnIndex, boolean x)

Updates a column specified by a column index with a boolean value.

abstract void updateBoolean(String columnName, boolean x)

Updates a column specified by a column name with a boolean value.

abstract void updateByte(String columnName, byte x)

Updates a column specified by a column name with a byte value.

abstract void updateByte(int columnIndex, byte x)

Updates a column specified by a column index with a byte value.

abstract void updateBytes(int columnIndex, byte[] x)

Updates a column specified by a column index with a byte array value.

abstract void updateBytes(String columnName, byte[] x)

Updates a column specified by a column name with a byte array value.

abstract void updateCharacterStream(String columnLabel, Reader reader)

Updates the value in the named column.

abstract void updateCharacterStream(String columnName, Reader reader, int length)

Updates a column specified by a column name with a character stream value.

abstract void updateCharacterStream(int columnIndex, Reader x, long length)

Updates the value at the 1-based columnIndex.

abstract void updateCharacterStream(String columnLabel, Reader reader, long length)

Updates the value in the named column.

abstract void updateCharacterStream(int columnIndex, Reader x)

Updates the value at the 1-based columnIndex.

abstract void updateCharacterStream(int columnIndex, Reader x, int length)

Updates a column specified by a column index with a character stream value.

abstract void updateClob(String columnLabel, Reader reader)

Updates the value in the named column.

abstract void updateClob(int columnIndex, Clob x)

Updates a column specified by a column index with a java.sql.Clob value.

abstract void updateClob(String columnLabel, Reader reader, long length)

Updates the value in the named column.

abstract void updateClob(int columnIndex, Reader reader, long length)

Updates the value at the 1-based columnIndex.

abstract void updateClob(int columnIndex, Reader reader)

Updates the value at the 1-based columnIndex.

abstract void updateClob(String columnName, Clob x)

Updates a column specified by a column name with a java.sql.Clob value.

abstract void updateDate(String columnName, Date x)

Updates a column specified by a column name with a java.sql.Date value.

abstract void updateDate(int columnIndex, Date x)

Updates a column specified by a column index with a java.sql.Date value.

abstract void updateDouble(String columnName, double x)

Updates a column specified by a column name with a double value.

abstract void updateDouble(int columnIndex, double x)

Updates a column specified by a column index with a double value.

abstract void updateFloat(String columnName, float x)

Updates a column specified by a column name with a float value.

abstract void updateFloat(int columnIndex, float x)

Updates a column specified by a column index with a float value.

abstract void updateInt(String columnName, int x)

Updates a column specified by a column name with an int value.

abstract void updateInt(int columnIndex, int x)

Updates a column specified by a column index with an int value.

abstract void updateLong(String columnName, long x)

Updates a column specified by a column name with a long value.

abstract void updateLong(int columnIndex, long x)

Updates a column specified by a column index with a long value.

abstract void updateNCharacterStream(String columnLabel, Reader reader)

Updates the value in the named column.

abstract void updateNCharacterStream(int columnIndex, Reader x)

Updates the value at the 1-based columnIndex.

abstract void updateNCharacterStream(String columnLabel, Reader reader, long length)

Updates the value in the named column.

abstract void updateNCharacterStream(int columnIndex, Reader x, long length)

Updates the value at the 1-based columnIndex.

abstract void updateNClob(int columnIndex, NClob nClob)

Updates the value at the 1-based columnIndex.

abstract void updateNClob(String columnLabel, NClob nClob)

Updates the value in the named column.

abstract void updateNClob(String columnLabel, Reader reader)

Updates the value in the named column.

abstract void updateNClob(int columnIndex, Reader reader)

Updates the value at the 1-based columnIndex.

abstract void updateNClob(int columnIndex, Reader reader, long length)

Updates the value at the 1-based columnIndex.

abstract void updateNClob(String columnLabel, Reader reader, long length)

Updates the value in the named column.

abstract void updateNString(String columnLabel, String nString)

Updates the value in the named column.

abstract void updateNString(int columnIndex, String nString)

Updates the value at the 1-based columnIndex.

abstract void updateNull(String columnName)

Updates a column specified by a column name with a null value.

abstract void updateNull(int columnIndex)

Updates a column specified by a column index with a null value.

abstract void updateObject(int columnIndex, Object x)

Updates a column specified by a column index with an Object value.

abstract void updateObject(int columnIndex, Object x, int scale)

Updates a column specified by a column index with an Object value.

abstract void updateObject(String columnName, Object x, int scale)

Updates a column specified by a column name with an Object value.

abstract void updateObject(String columnName, Object x)

Updates a column specified by a column name with an Object value.

abstract void updateRef(int columnIndex, Ref x)

Updates a column specified by a column index with a java.sql.Ref value.

abstract void updateRef(String columnName, Ref x)

Updates a column specified by a column name with a java.sql.Ref value.

abstract void updateRow()

Updates the database with the new contents of the current row of this ResultSet object.

abstract void updateRowId(String columnLabel, RowId value)

Updates the value in the named column.

abstract void updateRowId(int columnIndex, RowId value)

Updates the value at the 1-based columnIndex.

abstract void updateSQLXML(int columnIndex, SQLXML xmlObject)

Updates the value at the 1-based columnIndex.

abstract void updateSQLXML(String columnLabel, SQLXML xmlObject)

Updates the value in the named column.

abstract void updateShort(int columnIndex, short x)

Updates a column specified by a column index with a short value.

abstract void updateShort(String columnName, short x)

Updates a column specified by a column name with a short value.

abstract void updateString(int columnIndex, String x)

Updates a column specified by a column index with a String value.

abstract void updateString(String columnName, String x)

Updates a column specified by a column name with a String value.

abstract void updateTime(int columnIndex, Time x)

Updates a column specified by a column index with a Time value.

abstract void updateTime(String columnName, Time x)

Updates a column specified by a column name with a Time value.

abstract void updateTimestamp(int columnIndex, Timestamp x)

Updates a column specified by a column index with a Timestamp value.

abstract void updateTimestamp(String columnName, Timestamp x)

Updates a column specified by column name with a Timestamp value.

abstract boolean wasNull()

Determines whether the last column read from this ResultSet contained SQL NULL.

Inherited methods

From interface java.sql.Wrapper
From interface java.lang.AutoCloseable

Constants

CLOSE_CURSORS_AT_COMMIT

Added in API level 1
int CLOSE_CURSORS_AT_COMMIT

A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked.

Constant Value: 2 (0x00000002)

CONCUR_READ_ONLY

Added in API level 1
int CONCUR_READ_ONLY

A constant used to indicate the concurrency mode for a ResultSet object that cannot be updated.

Constant Value: 1007 (0x000003ef)

CONCUR_UPDATABLE

Added in API level 1
int CONCUR_UPDATABLE

A constant used to indicate the concurrency mode for a ResultSet object that can be updated.

Constant Value: 1008 (0x000003f0)

FETCH_FORWARD

Added in API level 1
int FETCH_FORWARD

A constant used to indicate processing of the rows of a ResultSet in the forward direction, first to last.

Constant Value: 1000 (0x000003e8)

FETCH_REVERSE

Added in API level 1
int FETCH_REVERSE

A constant used to indicate processing of the rows of a ResultSet in the reverse direction, last to first.

Constant Value: 1001 (0x000003e9)

FETCH_UNKNOWN

Added in API level 1
int FETCH_UNKNOWN

A constant used to indicate that the order of processing of the rows of a ResultSet is unknown.

Constant Value: 1002 (0x000003ea)

HOLD_CURSORS_OVER_COMMIT

Added in API level 1
int HOLD_CURSORS_OVER_COMMIT

A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked.

Constant Value: 1 (0x00000001)

TYPE_FORWARD_ONLY

Added in API level 1
int TYPE_FORWARD_ONLY

A constant used to indicate a ResultSet object whose cursor can only move forward.

Constant Value: 1003 (0x000003eb)

TYPE_SCROLL_INSENSITIVE

Added in API level 1
int TYPE_SCROLL_INSENSITIVE

A constant used to indicate a ResultSet object which is scrollable but is insensitive to changes made by others.

Constant Value: 1004 (0x000003ec)

TYPE_SCROLL_SENSITIVE

Added in API level 1
int TYPE_SCROLL_SENSITIVE

A constant used to indicate a ResultSet object which is scrollable and sensitive to changes made by others.

Constant Value: 1005 (0x000003ed)

Public methods

absolute

Added in API level 1
boolean absolute (int row)

Moves the cursor to a specified row number in the ResultSet.

Parameters
row int: the index of the row starting at index 1. Index -1 returns the last row.
Returns
boolean true if the new cursor position is on the ResultSet, false otherwise.
Throws
SQLException if a database error happens.

afterLast

Added in API level 1
void afterLast ()

Moves the cursor to the end of the ResultSet, after the last row.

Throws
SQLException if a database error happens.

beforeFirst

Added in API level 1
void beforeFirst ()

Moves the cursor to the start of the ResultSet, before the first row.

Throws
SQLException if a database error happens.

cancelRowUpdates

Added in API level 1
void cancelRowUpdates ()

Cancels any updates made to the current row in the ResultSet.

Throws
SQLException if a database error happens.

clearWarnings

Added in API level 1
void clearWarnings ()

Clears all warnings related to this ResultSet.

Throws
SQLException if a database error happens.

close

Added in API level 1
void close ()

Releases this ResultSet's database and JDBC resources. You are strongly advised to use this method rather than relying on the release being done when the ResultSet's finalize method is called during garbage collection process. Note that the close() method might take some time to complete since it is dependent on the behavior of the connection to the database and the database itself.

Throws
SQLException if a database error happens.

deleteRow

Added in API level 1
void deleteRow ()

Deletes the current row from the ResultSet and from the underlying database.

Throws
SQLException if a database error happens.

findColumn

Added in API level 1
int findColumn (String columnName)

Gets the index number for a column in the ResultSet from the provided column name.

Parameters
columnName String: the column name.
Returns
int the column's index in the ResultSet identified by column name.
Throws
SQLException if a database error happens.

first

Added in API level 1
boolean first ()

Shifts the cursor position to the first row in the ResultSet.

Returns
boolean true if the position is in a legitimate row, false if the ResultSet contains no rows.
Throws
SQLException if a database error happens.

getArray

Added in API level 1
Array getArray (int columnIndex)

Gets the content of a column specified by column index in the current row of this ResultSet as a java.sql.Array.

Parameters
columnIndex int: the index of the column to read
Returns
Array a java.sql.Array with the data from the column.
Throws
SQLException if a database error happens.

getArray

Added in API level 1
Array getArray (String colName)

Gets the value of a column specified by column name as a java.sql.Array.

Parameters
colName String: the name of the column to read.
Returns
Array a java.sql.Array with the data from the specified column.
Throws
SQLException if a database error happens.

getAsciiStream

Added in API level 1
InputStream getAsciiStream (int columnIndex)

Gets the value of a column specified by column index as an ASCII character stream.

Parameters
columnIndex int: the index of the column to read.
Returns
InputStream an InputStream with the data from the column.
Throws
SQLException if a database error happens.

getAsciiStream

Added in API level 1
InputStream getAsciiStream (String columnName)

Gets the value of a column specified by column name as an ASCII character stream.

Parameters
columnName String: the name of the column to read
Returns
InputStream an InputStream with the data from the column.
Throws
SQLException if a database error happens.

getBigDecimal

Added in API level 1
BigDecimal getBigDecimal (String columnName)

Gets the value of a column specified by column name, as a java.math.BigDecimal.

Parameters
columnName String: the name of the column to read.
Returns
BigDecimal a BigDecimal with value of the column.
Throws
SQLException if a database error happens.

getBigDecimal

Added in API level 1
BigDecimal getBigDecimal (int columnIndex, 
                int scale)

This method was deprecated in API level 1.
Use getBigDecimal(int) or getBigDecimal(String) instead.

Gets the value of a column specified by column index as a java.math.BigDecimal.

Parameters
columnIndex int: the index of the column to read.
scale int: the number of digits after the decimal point
Returns
BigDecimal a BigDecimal with the value of the column.
Throws
SQLException if a database error happens.

getBigDecimal

Added in API level 1
BigDecimal getBigDecimal (int columnIndex)

Gets the value of a column specified by column index as a java.math.BigDecimal.

Parameters
columnIndex int: the index of the column to read.
Returns
BigDecimal a BigDecimal with the value of the column.
Throws
SQLException if a database error happens.

getBigDecimal

Added in API level 1
BigDecimal getBigDecimal (String columnName, 
                int scale)

This method was deprecated in API level 1.
Use getBigDecimal(int) or getBigDecimal(String) instead.

Gets the value of a column specified by column name, as a java.math.BigDecimal.

Parameters
columnName String: the name of the column to read.
scale int: the number of digits after the decimal point
Returns
BigDecimal a BigDecimal with value of the column.
Throws
SQLException if a database error happens.

getBinaryStream

Added in API level 1
InputStream getBinaryStream (int columnIndex)

Gets the value of a column specified by column index as a binary stream.

This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.

Parameters
columnIndex int: the index of the column to read.
Returns
InputStream an InputStream with the data from the column. If the column value is SQL NULL, null is returned.
Throws
SQLException if a database error happens.

getBinaryStream

Added in API level 1
InputStream getBinaryStream (String columnName)

Gets the value of a column specified by column name as a binary stream.

This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.

Parameters
columnName String: the name of the column to read.
Returns
InputStream an InputStream with the data from the column if the column value is SQL NULL, null is returned.
Throws
SQLException if a database error happens.

getBlob

Added in API level 1
Blob getBlob (String columnName)

Gets the value of a column specified by column name, as a java.sql.Blob object.

Parameters
columnName String: the name of the column to read.
Returns
Blob a java.sql.Blob with the value of the column.
Throws
SQLException if a database error happens.

getBlob

Added in API level 1
Blob getBlob (int columnIndex)

Gets the value of a column specified by column index as a java.sql.Blob object.

Parameters
columnIndex int: the index of the column to read.
Returns
Blob a java.sql.Blob with the value of the column.
Throws
SQLException if a database error happens.

getBoolean

Added in API level 1
boolean getBoolean (int columnIndex)

Gets the value of a column specified by column index as a boolean .

Parameters
columnIndex int: the index of the column to read.
Returns
boolean a boolean value from the column. If the column is SQL NULL, false is returned.
Throws
SQLException if a database error happens.

getBoolean

Added in API level 1
boolean getBoolean (String columnName)

Gets the value of a column specified by column name, as a boolean .

Parameters
columnName String: the name of the column to read.
Returns
boolean a boolean value from the column. If the column is SQL NULL, false is returned.
Throws
SQLException if a database error happens.

getByte

Added in API level 1
byte getByte (String columnName)

Gets the value of a column specified by column name as a byte.

Parameters
columnName String: the name of the column to read.
Returns
byte a byte equal to the value of the column. 0 if the value is SQL NULL.
Throws
SQLException if a database error happens.

getByte

Added in API level 1
byte getByte (int columnIndex)

Gets the value of a column specified by column index as a byte.

Parameters
columnIndex int: the index of the column to read.
Returns
byte a byte equal to the value of the column. 0 if the value is SQL NULL.
Throws
SQLException if a database error happens.

getBytes

Added in API level 1
byte[] getBytes (int columnIndex)

Gets the value of a column specified by column index as a byte array.

Parameters
columnIndex int: the index of the column to read.
Returns
byte[] a byte array containing the value of the column. null if the column contains SQL NULL.
Throws
SQLException if a database error happens.

getBytes

Added in API level 1
byte[] getBytes (String columnName)

Gets the value of a column specified by column name as a byte array.

Parameters
columnName String: the name of the column to read.
Returns
byte[] a byte array containing the value of the column. null if the column contains SQL NULL.
Throws
SQLException if a database error happens.

getCharacterStream

Added in API level 1
Reader getCharacterStream (String columnName)

Gets the value of a column specified by column name as a java.io.Reader object.

Parameters
columnName String: the name of the column to read.
Returns
Reader a Reader holding the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getCharacterStream

Added in API level 1
Reader getCharacterStream (int columnIndex)

Gets the value of a column specified by column index as a java.io.Reader object.

Parameters
columnIndex int: the index of the column to read.
Returns
Reader a Reader holding the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

See also:

getClob

Added in API level 1
Clob getClob (int columnIndex)

Gets the value of a column specified by column index as a java.sql.Clob.

Parameters
columnIndex int: the index of the column to read.
Returns
Clob a Clob object representing the value in the column. null if the value is SQL NULL.
Throws
SQLException if a database error happens.

getClob

Added in API level 1
Clob getClob (String colName)

Gets the value of a column specified by column name as a java.sql.Clob.

Parameters
colName String: the name of the column to read.
Returns
Clob a Clob object representing the value in the column. null if the value is SQL NULL.
Throws
SQLException if a database error happens.

getConcurrency

Added in API level 1
int getConcurrency ()

Gets the concurrency mode of this ResultSet.

Returns
int the concurrency mode - one of: ResultSet.CONCUR_READ_ONLY , ResultSet.CONCUR_UPDATABLE.
Throws
SQLException if a database error happens.

getCursorName

Added in API level 1
String getCursorName ()

Gets the name of the SQL cursor of this ResultSet.

Returns
String the SQL cursor name.
Throws
SQLException if a database error happens.

getDate

Added in API level 1
Date getDate (int columnIndex, 
                Calendar cal)

Gets the value of a column specified by column index as a java.sql.Date. This method uses a supplied calendar to compute the Date.

Parameters
columnIndex int: the index of the column to read.
cal Calendar: a java.util.Calendar to use in constructing the Date.
Returns
Date a java.sql.Date matching the column value. null if the column is SQL NULL.
Throws
SQLException if a database error happens.

getDate

Added in API level 1
Date getDate (int columnIndex)

Gets the value of a column specified by column index as a java.sql.Date.

Parameters
columnIndex int: the index of the column to read.
Returns
Date a java.sql.Date matching the column value. null if the column is SQL NULL.
Throws
SQLException if a database error happens.

getDate

Added in API level 1
Date getDate (String columnName, 
                Calendar cal)

Gets the value of a column specified by column name, as a java.sql.Date object.

Parameters
columnName String: the name of the column to read.
cal Calendar: java.util.Calendar to use in constructing the Date.
Returns
Date a java.sql.Date matching the column value. null if the column is SQL NULL.
Throws
SQLException if a database error happens.

getDate

Added in API level 1
Date getDate (String columnName)

Gets the value of a column specified by column name as a java.sql.Date.

Parameters
columnName String: the name of the column to read.
Returns
Date a java.sql.Date matching the column value. null if the column is SQL NULL.
Throws
SQLException if a database error happens.

getDouble

Added in API level 1
double getDouble (String columnName)

Gets the value of a column specified by column name as a double value.

Parameters
columnName String: the name of the column to read.
Returns
double a double equal to the column value. 0.0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getDouble

Added in API level 1
double getDouble (int columnIndex)

Gets the value of a column specified by column index as a double value.

Parameters
columnIndex int: the index of the column to read.
Returns
double a double equal to the column value. 0.0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getFetchDirection

Added in API level 1
int getFetchDirection ()

Gets the direction in which rows are fetched for this ResultSet object.

Returns
int the fetch direction. Will be one of:
  • ResultSet.FETCH_FORWARD
  • ResultSet.FETCH_REVERSE
  • ResultSet.FETCH_UNKNOWN
Throws
SQLException if a database error happens.

getFetchSize

Added in API level 1
int getFetchSize ()

Gets the fetch size (in number of rows) for this ResultSet.

Returns
int the fetch size as an int
Throws
SQLException if a database error happens.

getFloat

Added in API level 1
float getFloat (int columnIndex)

Gets the value of a column specified by column index as a float value.

Parameters
columnIndex int: the index of the column to read.
Returns
float a float equal to the column value. 0.0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getFloat

Added in API level 1
float getFloat (String columnName)

Gets the value of a column specified by column name as a float value.

Parameters
columnName String: the name of the column to read.
Returns
float a float equal to the column value. 0.0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getHoldability

Added in API level 9
int getHoldability ()

Returns the holdability of this result set: HOLD_CURSORS_OVER_COMMIT or CLOSE_CURSORS_AT_COMMIT.

Returns
int
Throws
SQLException

getInt

Added in API level 1
int getInt (String columnName)

Gets the value of a column specified by column name, as an int value.

Parameters
columnName String: the name of the column to read.
Returns
int an int equal to the column value. 0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getInt

Added in API level 1
int getInt (int columnIndex)

Gets the value of a column specified by column index as an int value.

Parameters
columnIndex int: the index of the column to read.
Returns
int an int equal to the column value. 0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getLong

Added in API level 1
long getLong (String columnName)

Gets the value of a column specified by column name, as a long value.

Parameters
columnName String: the name of the column to read.
Returns
long a long equal to the column value. 0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getLong

Added in API level 1
long getLong (int columnIndex)

Gets the value of a column specified by column index as a long value.

Parameters
columnIndex int: the index of the column to read.
Returns
long a long equal to the column value. 0 if the column is SQL NULL.
Throws
SQLException if a database error happens.

getMetaData

Added in API level 1
ResultSetMetaData getMetaData ()

Gets the metadata for this ResultSet. This defines the number, types and properties of the columns in the ResultSet.

Returns
ResultSetMetaData a ResultSetMetaData object with information about this ResultSet.
Throws
SQLException if a database error happens.

getNCharacterStream

Added in API level 9
Reader getNCharacterStream (int columnIndex)

Returns a Reader corresponding to the value at the 1-based columnIndex.

Parameters
columnIndex int
Returns
Reader
Throws
SQLException

getNCharacterStream

Added in API level 9
Reader getNCharacterStream (String columnLabel)

Returns a Reader corresponding to the value in the named column.

Parameters
columnLabel String
Returns
Reader
Throws
SQLException

getNClob

Added in API level 9
NClob getNClob (String columnLabel)

Returns an NClob corresponding to the value in the named column.

Parameters
columnLabel String
Returns
NClob
Throws
SQLException

getNClob

Added in API level 9
NClob getNClob (int columnIndex)

Returns an NClob corresponding to the value at the 1-based columnIndex.

Parameters
columnIndex int
Returns
NClob
Throws
SQLException

getNString

Added in API level 9
String getNString (String columnLabel)

Returns a String corresponding to the value in the named column.

Parameters
columnLabel String
Returns
String
Throws
SQLException

getNString

Added in API level 9
String getNString (int columnIndex)

Returns a String corresponding to the value at the 1-based columnIndex.

Parameters
columnIndex int
Returns
String
Throws
SQLException

getObject

Added in API level 1
Object getObject (String columnName, 
                Map<StringClass<?>> map)

Gets the value of a column specified by column name as a Java Object.

The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.

Parameters
columnName String: the name of the column to read.
map Map: a java.util.Map containing a mapping from SQL Type names to Java classes.
Returns
Object an Object containing the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getObject

Added in API level 1
Object getObject (int columnIndex, 
                Map<StringClass<?>> map)

Gets the value of a column specified by column index as a Java Object.

The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.

Parameters
columnIndex int: the index of the column to read.
map Map: a java.util.Map containing a mapping from SQL Type names to Java classes.
Returns
Object an Object containing the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getObject

Added in API level 1
Object getObject (String columnName)

Gets the value of a specified column as a Java Object. The type of the returned object will be the default according to the column's SQL type, following the JDBC specification for built-in types.

For SQL User Defined Types, if a column value is structured or distinct, this method behaves the same as a call to: getObject(columnIndex,this.getStatement().getConnection().getTypeMap())

Parameters
columnName String: the name of the column to read.
Returns
Object an Object containing the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getObject

Added in API level 1
Object getObject (int columnIndex)

Gets the value of a specified column as a Java Object. The type of the returned object will be the default according to the column's SQL type, following the JDBC specification for built-in types.

For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex,this.getStatement().getConnection().getTypeMap())

Parameters
columnIndex int: the index of the column to read.
Returns
Object an Object containing the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getRef

Added in API level 1
Ref getRef (String colName)

Gets the value of a column specified by column name as a Java java.sql.Ref.

Parameters
colName String: the name of the column to read.
Returns
Ref a Ref representing the value of the SQL REF in the column
Throws
SQLException if a database error happens.

getRef

Added in API level 1
Ref getRef (int columnIndex)

Gets the value of a column specified by column index as a Java java.sql.Ref.

Parameters
columnIndex int: the index of the column to read.
Returns
Ref a Ref representing the value of the SQL REF in the column
Throws
SQLException if a database error happens.

getRow

Added in API level 1
int getRow ()

Gets the number of the current row in the ResultSet. Row numbers start at 1 for the first row.

Returns
int the index number of the current row. 0 is returned if there is no current row.
Throws
SQLException if a database error happens.

getRowId

Added in API level 9
RowId getRowId (String columnLabel)

Returns a RowId corresponding to the SQL ROWID at the named column.

Parameters
columnLabel String
Returns
RowId
Throws
SQLException

getRowId

Added in API level 9
RowId getRowId (int columnIndex)

Returns a RowId corresponding to the SQL ROWID at the 1-based columnIndex.

Parameters
columnIndex int
Returns
RowId
Throws
SQLException

getSQLXML

Added in API level 9
SQLXML getSQLXML (String columnLabel)

Returns an SQLXML corresponding to the value in the named column.

Parameters
columnLabel String
Returns
SQLXML
Throws
SQLException

getSQLXML

Added in API level 9
SQLXML getSQLXML (int columnIndex)

Returns an SQLXML corresponding to the value at the 1-based columnIndex.

Parameters
columnIndex int
Returns
SQLXML
Throws
SQLException

getShort

Added in API level 1
short getShort (String columnName)

Gets the value of a column specified by column name, as a short value.

Parameters
columnName String: the name of the column to read.
Returns
short a short value equal to the value of the column. 0 if the value is SQL NULL.
Throws
SQLException if a database error happens.

getShort

Added in API level 1
short getShort (int columnIndex)

Gets the value of a column specified by column index as a short value.

Parameters
columnIndex int: the index of the column to read.
Returns
short a short value equal to the value of the column. 0 if the value is SQL NULL.
Throws
SQLException if a database error happens.

getStatement

Added in API level 1
Statement getStatement ()

Gets the statement that produced this ResultSet. If the ResultSet was not created by a statement (i.e. because it was returned from one of the DatabaseMetaData methods), null is returned.

Returns
Statement the Statement which produced this ResultSet, or null if the ResultSet was not created by a Statement.
Throws
SQLException if a database error happens.

getString

Added in API level 1
String getString (int columnIndex)

Gets the value of a column specified by column index as a String.

Parameters
columnIndex int: the index of the column to read.
Returns
String the String representing the value of the column, null if the column is SQL NULL.
Throws
SQLException if a database error happens.

getString

Added in API level 1
String getString (String columnName)

Gets the value of a column specified by column name, as a String.

Parameters
columnName String: the name of the column to read.
Returns
String the String representing the value of the column, null if the column is SQL NULL.
Throws
SQLException if a database error happens.

getTime

Added in API level 1
Time getTime (String columnName, 
                Calendar cal)

Gets the value of a column specified by column index, as a java.sql.Time value. The supplied Calendar is used to map the SQL Time value to a Java Time value.

Parameters
columnName String: the name of the column to read.
cal Calendar: a Calendar to use in creating the Java time value.
Returns
Time a Time representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTime

Added in API level 1
Time getTime (String columnName)

Gets the value of a column specified by column name, as a java.sql.Time value.

Parameters
columnName String: the name of the column to read.
Returns
Time the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTime

Added in API level 1
Time getTime (int columnIndex, 
                Calendar cal)

Gets the value of a column specified by column index as a java.sql.Time value. The supplied Calendar is used to map the SQL Time value to a Java Time value.

Parameters
columnIndex int: the index of the column to read.
cal Calendar: a Calendar to use in creating the Java Time value.
Returns
Time a Time representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTime

Added in API level 1
Time getTime (int columnIndex)

Gets the value of a column specified by column index as a java.sql.Time value.

Parameters
columnIndex int: the index of the column to read.
Returns
Time a Time representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTimestamp

Added in API level 1
Timestamp getTimestamp (int columnIndex, 
                Calendar cal)

Gets the value of a column specified by column index, as a java.sql.Timestamp value. The supplied Calendar is used when mapping the SQL Timestamp value to a Java Timestamp value.

Parameters
columnIndex int: the index of the column to read.
cal Calendar: Calendar to use in creating the Java timestamp value.
Returns
Timestamp a timestamp representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTimestamp

Added in API level 1
Timestamp getTimestamp (String columnName)

Gets the value of a column specified by column name, as a java.sql.Timestamp value.

Parameters
columnName String: the name of the column to read.
Returns
Timestamp a timestamp representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTimestamp

Added in API level 1
Timestamp getTimestamp (String columnName, 
                Calendar cal)

Gets the value of a column specified by column name, as a java.sql.Timestamp value. The supplied Calendar is used when mapping the SQL Timestamp value to a Java Timestamp value.

Parameters
columnName String: the name of the column to read.
cal Calendar: Calendar to use in creating the Java Timestamp value.
Returns
Timestamp a timestamp representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getTimestamp

Added in API level 1
Timestamp getTimestamp (int columnIndex)

Gets the value of a column specified by column index as a java.sql.Timestamp value.

Parameters
columnIndex int: the index of the column to read.
Returns
Timestamp a timestamp representing the column value, null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getType

Added in API level 1
int getType ()

Gets the type of the ResultSet.

Returns
int The ResultSet type, one of:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Throws
SQLException if there is a database error.

getURL

Added in API level 1
URL getURL (int columnIndex)

Gets the value of a column specified by column index as a java.net.URL.

Parameters
columnIndex int: the index of the column to read.
Returns
URL a URL. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getURL

Added in API level 1
URL getURL (String columnName)

Gets the value of a column specified by column name as a java.net.URL object.

Parameters
columnName String: the name of the column to read.
Returns
URL the column vaule as a URL. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getUnicodeStream

Added in API level 1
InputStream getUnicodeStream (int columnIndex)

This method was deprecated in API level 1.
Use getCharacterStream(int) instead.

Gets the value of the column as an InputStream of unicode characters.

Parameters
columnIndex int: the index of the column to read.
Returns
InputStream an InputStream holding the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getUnicodeStream

Added in API level 1
InputStream getUnicodeStream (String columnName)

This method was deprecated in API level 1.
Use getCharacterStream(int) instead.

Gets the value of the column as an InputStream of Unicode characters.

Parameters
columnName String: the name of the column to read.
Returns
InputStream an InputStream holding the value of the column. null if the column value is SQL NULL.
Throws
SQLException if a database error happens.

getWarnings

Added in API level 1
SQLWarning getWarnings ()

Gets the first warning generated by calls on this ResultSet. Subsequent warnings on this ResultSet are chained to the first one.

The warnings are cleared when a new Row is read from the ResultSet. The warnings returned by this method are only the warnings generated by ResultSet method calls - warnings generated by Statement methods are held by the Statement.

An SQLException is generated if this method is called on a closed ResultSet.

Returns
SQLWarning an SQLWarning which is the first warning for this ResultSet. null if there are no warnings.
Throws
SQLException if a database error happens.

insertRow

Added in API level 1
void insertRow ()

Insert the insert row into the ResultSet and into the underlying database. The cursor must be set to the Insert Row before this method is invoked.

Throws
SQLException if a database error happens. Particular cases include the cursor not being on the Insert Row or if any columns in the row do not have a value where the column is declared as not-nullable.

isAfterLast

Added in API level 1
boolean isAfterLast ()

Gets if the cursor is after the last row of the ResultSet.

Returns
boolean true if the cursor is after the last row in the ResultSet, false if the cursor is at any other position in the ResultSet.
Throws
SQLException if a database error happens.

isBeforeFirst

Added in API level 1
boolean isBeforeFirst ()

Gets if the cursor is before the first row of the ResultSet.

Returns
boolean true if the cursor is before the first row in the ResultSet, false if the cursor is at any other position in the ResultSet.
Throws
SQLException if a database error happens.

isClosed

Added in API level 9
boolean isClosed ()

Returns true if this result set has been closed, false otherwise.

Returns
boolean
Throws
SQLException

isFirst

Added in API level 1
boolean isFirst ()

Gets if the cursor is on the first row of the ResultSet.

Returns
boolean true if the cursor is on the first row in the ResultSet, false if the cursor is at any other position in the ResultSet.
Throws
SQLException if a database error happens.

isLast

Added in API level 1
boolean isLast ()

Gets if the cursor is on the last row of the ResultSet

Returns
boolean true if the cursor is on the last row in the ResultSet, false if the cursor is at any other position in the ResultSet.
Throws
SQLException if a database error happens.

last

Added in API level 1
boolean last ()

Shifts the cursor position to the last row of the ResultSet.

Returns
boolean true if the new position is in a legitimate row, false if the ResultSet contains no rows.
Throws
SQLException if there is a database error.

moveToCurrentRow

Added in API level 1
void moveToCurrentRow ()

Moves the cursor to the remembered position, namely the row that was the current row before a call to moveToInsertRow. This only applies if the cursor is on the Insert Row.

Throws
SQLException if a database error happens.

moveToInsertRow

Added in API level 1
void moveToInsertRow ()

Moves the cursor position to the Insert Row. The current position is remembered and the cursor is positioned at the Insert Row. The columns in the Insert Row should be filled in with the appropriate update methods, before calling insertRow to insert the new row into the database.

Throws
SQLException if a database error happens.

next

Added in API level 1
boolean next ()

Shifts the cursor position down one row in this ResultSet object.

Any input streams associated with the current row are closed and any warnings are cleared.

Returns
boolean true if the updated cursor position is pointing to a valid row, false otherwise (i.e. when the cursor is after the last row in the ResultSet).
Throws
SQLException if a database error happens.

previous

Added in API level 1
boolean previous ()

Relocates the cursor position to the preceding row in this ResultSet.

Returns
boolean true if the new position is in a legitimate row, false if the cursor is now before the first row.
Throws
SQLException if a database error happens.

refreshRow

Added in API level 1
void refreshRow ()

Refreshes the current row with its most up to date value in the database. Must not be called when the cursor is on the Insert Row.

If any columns in the current row have been updated but the updateRow has not been called, then the updates are lost when this method is called.

Throws
SQLException if a database error happens., including if the current row is the Insert row.

relative

Added in API level 1
boolean relative (int rows)

Moves the cursor position up or down by a specified number of rows. If the new position is beyond the start row (or end row), the cursor position is set before the first row (or, respectively, after the last row).

Parameters
rows int: a number of rows to move the cursor - may be positive or negative
Returns
boolean true if the new cursor position is on a row, false otherwise
Throws
SQLException if a database error happens.

rowDeleted

Added in API level 1
boolean rowDeleted ()

Indicates whether a row has been deleted. This method depends on whether the JDBC driver and database can detect deletions.

Returns
boolean true if a row has been deleted and if deletions are detected, false otherwise.
Throws
SQLException if a database error happens.

rowInserted

Added in API level 1
boolean rowInserted ()

Indicates whether the current row has had an insertion operation. This method depends on whether the JDBC driver and database can detect insertions.

Returns
boolean true if a row has been inserted and if insertions are detected, false otherwise.
Throws
SQLException if a database error happens.

rowUpdated

Added in API level 1
boolean rowUpdated ()

Indicates whether the current row has been updated. This method depends on whether the JDBC driver and database can detect updates.

Returns
boolean true if the current row has been updated and if updates can be detected, false otherwise.
Throws
SQLException if a database error happens.

setFetchDirection

Added in API level 1
void setFetchDirection (int direction)

Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object. This is treated as a hint by the JDBC driver.

Parameters
direction int: can be ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN
Throws
SQLException if there is a database error.

setFetchSize

Added in API level 1
void setFetchSize (int rows)

Indicates the number of rows to fetch from the database when extra rows are required for this ResultSet. This used as a hint to the JDBC driver.

Parameters
rows int: the number of rows to fetch. 0 implies that the JDBC driver can make its own decision about the fetch size. The number should not be greater than the maximum number of rows established by the statement that generated the ResultSet.
Throws
SQLException if a database error happens.

updateArray

Added in API level 1
void updateArray (int columnIndex, 
                Array x)

Updates a column specified by a column index with a java.sql.Array value.

Parameters
columnIndex int: the index of the column to update.
x Array: the new value for the specified column.
Throws
SQLException if a database error happens.

updateArray

Added in API level 1
void updateArray (String columnName, 
                Array x)

Updates a column specified by a column name with a java.sql.Array value.

Parameters
columnName String: the name of the column to update.
x Array: the new value for the specified column.
Throws
SQLException if a database error happens.

updateAsciiStream

Added in API level 1
void updateAsciiStream (String columnName, 
                InputStream x, 
                int length)

Updates a column specified by a column name with an Ascii stream value.

Parameters
columnName String: the name of the column to update.
x InputStream: the new value for the specified column.
length int: the length of the data to write from the stream
Throws
SQLException if a database error happens.

updateAsciiStream

Added in API level 9
void updateAsciiStream (int columnIndex, 
                InputStream x, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x InputStream
length long
Throws
SQLException

updateAsciiStream

Added in API level 9
void updateAsciiStream (String columnLabel, 
                InputStream x, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
x InputStream
length long
Throws
SQLException

updateAsciiStream

Added in API level 9
void updateAsciiStream (String columnLabel, 
                InputStream x)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
x InputStream
Throws
SQLException

updateAsciiStream

Added in API level 9
void updateAsciiStream (int columnIndex, 
                InputStream x)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x InputStream
Throws
SQLException

updateAsciiStream

Added in API level 1
void updateAsciiStream (int columnIndex, 
                InputStream x, 
                int length)

Updates a column specified by a column index with an ASCII stream value.

Parameters
columnIndex int: the index of the column to update.
x InputStream: the new value for the specified column.
length int: the length of the data to write from the stream
Throws
SQLException if a database error happens.

updateBigDecimal

Added in API level 1
void updateBigDecimal (int columnIndex, 
                BigDecimal x)

Updates a column specified by a column index with a java.sql.BigDecimal value.

Parameters
columnIndex int: the index of the column to update.
x BigDecimal: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBigDecimal

Added in API level 1
void updateBigDecimal (String columnName, 
                BigDecimal x)

Updates a column specified by a column name with a java.sql.BigDecimal value.

Parameters
columnName String: the name of the column to update.
x BigDecimal: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBinaryStream

Added in API level 9
void updateBinaryStream (int columnIndex, 
                InputStream x)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x InputStream
Throws
SQLException

updateBinaryStream

Added in API level 9
void updateBinaryStream (int columnIndex, 
                InputStream x, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x InputStream
length long
Throws
SQLException

updateBinaryStream

Added in API level 9
void updateBinaryStream (String columnLabel, 
                InputStream x, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
x InputStream
length long
Throws
SQLException

updateBinaryStream

Added in API level 1
void updateBinaryStream (int columnIndex, 
                InputStream x, 
                int length)

Updates a column specified by a column index with a binary stream value.

Parameters
columnIndex int: the index of the column to update.
x InputStream: the new value for the specified column.
length int: the number of bytes to be read from the the stream.
Throws
SQLException if a database error happens.

updateBinaryStream

Added in API level 9
void updateBinaryStream (String columnLabel, 
                InputStream x)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
x InputStream
Throws
SQLException

updateBinaryStream

Added in API level 1
void updateBinaryStream (String columnName, 
                InputStream x, 
                int length)

Updates a column specified by a column name with a binary stream value.

Parameters
columnName String: the name of the column to update.
x InputStream: the new value for the specified column.
length int: he number of bytes to be read from the the stream.
Throws
SQLException if a database error happens.

updateBlob

Added in API level 1
void updateBlob (int columnIndex, 
                Blob x)

Updates a column specified by a column index with a java.sql.Blob value.

Parameters
columnIndex int: the index of the column to update.
x Blob: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBlob

Added in API level 9
void updateBlob (String columnLabel, 
                InputStream inputStream)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
inputStream InputStream
Throws
SQLException

updateBlob

Added in API level 9
void updateBlob (String columnLabel, 
                InputStream inputStream, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
inputStream InputStream
length long
Throws
SQLException

updateBlob

Added in API level 9
void updateBlob (int columnIndex, 
                InputStream inputStream)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
inputStream InputStream
Throws
SQLException

updateBlob

Added in API level 9
void updateBlob (int columnIndex, 
                InputStream inputStream, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
inputStream InputStream
length long
Throws
SQLException

updateBlob

Added in API level 1
void updateBlob (String columnName, 
                Blob x)

Updates a column specified by a column name with a java.sql.Blob value.

Parameters
columnName String: the name of the column to update.
x Blob: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBoolean

Added in API level 1
void updateBoolean (int columnIndex, 
                boolean x)

Updates a column specified by a column index with a boolean value.

Parameters
columnIndex int: the index of the column to update.
x boolean: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBoolean

Added in API level 1
void updateBoolean (String columnName, 
                boolean x)

Updates a column specified by a column name with a boolean value.

Parameters
columnName String: the name of the column to update.
x boolean: the new value for the specified column.
Throws
SQLException if a database error happens.

updateByte

Added in API level 1
void updateByte (String columnName, 
                byte x)

Updates a column specified by a column name with a byte value.

Parameters
columnName String: the name of the column to update.
x byte: the new value for the specified column.
Throws
SQLException if a database error happens.

updateByte

Added in API level 1
void updateByte (int columnIndex, 
                byte x)

Updates a column specified by a column index with a byte value.

Parameters
columnIndex int: the index of the column to update.
x byte: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBytes

Added in API level 1
void updateBytes (int columnIndex, 
                byte[] x)

Updates a column specified by a column index with a byte array value.

Parameters
columnIndex int: the index of the column to update.
x byte: the new value for the specified column.
Throws
SQLException if a database error happens.

updateBytes

Added in API level 1
void updateBytes (String columnName, 
                byte[] x)

Updates a column specified by a column name with a byte array value.

Parameters
columnName String: the name of the column to update.
x byte: the new value for the specified column.
Throws
SQLException if a database error happens.

updateCharacterStream

Added in API level 9
void updateCharacterStream (String columnLabel, 
                Reader reader)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
Throws
SQLException

updateCharacterStream

Added in API level 1
void updateCharacterStream (String columnName, 
                Reader reader, 
                int length)

Updates a column specified by a column name with a character stream value.

Parameters
columnName String: the name of the column to update.
reader Reader: the new value for the specified column.
length int: the length of data to write from the Reader
Throws
SQLException if a database error happens.

updateCharacterStream

Added in API level 9
void updateCharacterStream (int columnIndex, 
                Reader x, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x Reader
length long
Throws
SQLException

updateCharacterStream

Added in API level 9
void updateCharacterStream (String columnLabel, 
                Reader reader, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
length long
Throws
SQLException

updateCharacterStream

Added in API level 9
void updateCharacterStream (int columnIndex, 
                Reader x)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x Reader
Throws
SQLException

updateCharacterStream

Added in API level 1
void updateCharacterStream (int columnIndex, 
                Reader x, 
                int length)

Updates a column specified by a column index with a character stream value.

Parameters
columnIndex int: the index of the column to update.
x Reader: the new value for the specified column.
length int: the length of data to write from the stream
Throws
SQLException if a database error happens.

updateClob

Added in API level 9
void updateClob (String columnLabel, 
                Reader reader)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
Throws
SQLException

updateClob

Added in API level 1
void updateClob (int columnIndex, 
                Clob x)

Updates a column specified by a column index with a java.sql.Clob value.

Parameters
columnIndex int: the index of the column to update.
x Clob: the new value for the specified column.
Throws
SQLException if a database error happens.

updateClob

Added in API level 9
void updateClob (String columnLabel, 
                Reader reader, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
length long
Throws
SQLException

updateClob

Added in API level 9
void updateClob (int columnIndex, 
                Reader reader, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
reader Reader
length long
Throws
SQLException

updateClob

Added in API level 9
void updateClob (int columnIndex, 
                Reader reader)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
reader Reader
Throws
SQLException

updateClob

Added in API level 1
void updateClob (String columnName, 
                Clob x)

Updates a column specified by a column name with a java.sql.Clob value.

Parameters
columnName String: the name of the column to update.
x Clob: the new value for the specified column.
Throws
SQLException if a database error happens.

updateDate

Added in API level 1
void updateDate (String columnName, 
                Date x)

Updates a column specified by a column name with a java.sql.Date value.

Parameters
columnName String: the name of the column to update.
x Date: the new value for the specified column.
Throws
SQLException if a database error happens.

updateDate

Added in API level 1
void updateDate (int columnIndex, 
                Date x)

Updates a column specified by a column index with a java.sql.Date value.

Parameters
columnIndex int: the index of the column to update.
x Date: the new value for the specified column.
Throws
SQLException if a database error happens.

updateDouble

Added in API level 1
void updateDouble (String columnName, 
                double x)

Updates a column specified by a column name with a double value.

Parameters
columnName String: the name of the column to update.
x double: the new value for the specified column.
Throws
SQLException if a database error happens.

updateDouble

Added in API level 1
void updateDouble (int columnIndex, 
                double x)

Updates a column specified by a column index with a double value.

Parameters
columnIndex int: the index of the column to update.
x double: the new value for the specified column.
Throws
SQLException if a database error happens.

updateFloat

Added in API level 1
void updateFloat (String columnName, 
                float x)

Updates a column specified by a column name with a float value.

Parameters
columnName String: the name of the column to update.
x float: the new value for the specified column.
Throws
SQLException if a database error happens.

updateFloat

Added in API level 1
void updateFloat (int columnIndex, 
                float x)

Updates a column specified by a column index with a float value.

Parameters
columnIndex int: the index of the column to update.
x float: the new value for the specified column.
Throws
SQLException if a database error happens.

updateInt

Added in API level 1
void updateInt (String columnName, 
                int x)

Updates a column specified by a column name with an int value.

Parameters
columnName String: the name of the column to update.
x int: the new value for the specified column.
Throws
SQLException if a database error happens.

updateInt

Added in API level 1
void updateInt (int columnIndex, 
                int x)

Updates a column specified by a column index with an int value.

Parameters
columnIndex int: the index of the column to update.
x int: the new value for the specified column.
Throws
SQLException if a database error happens.

updateLong

Added in API level 1
void updateLong (String columnName, 
                long x)

Updates a column specified by a column name with a long value.

Parameters
columnName String: the name of the column to update.
x long: the new value for the specified column.
Throws
SQLException if a database error happens.

updateLong

Added in API level 1
void updateLong (int columnIndex, 
                long x)

Updates a column specified by a column index with a long value.

Parameters
columnIndex int: the index of the column to update.
x long: the new value for the specified column..
Throws
SQLException if a database error happens.

updateNCharacterStream

Added in API level 9
void updateNCharacterStream (String columnLabel, 
                Reader reader)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
Throws
SQLException

updateNCharacterStream

Added in API level 9
void updateNCharacterStream (int columnIndex, 
                Reader x)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x Reader
Throws
SQLException

updateNCharacterStream

Added in API level 9
void updateNCharacterStream (String columnLabel, 
                Reader reader, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
length long
Throws
SQLException

updateNCharacterStream

Added in API level 9
void updateNCharacterStream (int columnIndex, 
                Reader x, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
x Reader
length long
Throws
SQLException

updateNClob

Added in API level 9
void updateNClob (int columnIndex, 
                NClob nClob)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
nClob NClob
Throws
SQLException

updateNClob

Added in API level 9
void updateNClob (String columnLabel, 
                NClob nClob)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
nClob NClob
Throws
SQLException

updateNClob

Added in API level 9
void updateNClob (String columnLabel, 
                Reader reader)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
Throws
SQLException

updateNClob

Added in API level 9
void updateNClob (int columnIndex, 
                Reader reader)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
reader Reader
Throws
SQLException

updateNClob

Added in API level 9
void updateNClob (int columnIndex, 
                Reader reader, 
                long length)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
reader Reader
length long
Throws
SQLException

updateNClob

Added in API level 9
void updateNClob (String columnLabel, 
                Reader reader, 
                long length)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
reader Reader
length long
Throws
SQLException

updateNString

Added in API level 9
void updateNString (String columnLabel, 
                String nString)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
nString String
Throws
SQLException

updateNString

Added in API level 9
void updateNString (int columnIndex, 
                String nString)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
nString String
Throws
SQLException

updateNull

Added in API level 1
void updateNull (String columnName)

Updates a column specified by a column name with a null value.

Parameters
columnName String: the name of the column to update.
Throws
SQLException if a database error happens.

updateNull

Added in API level 1
void updateNull (int columnIndex)

Updates a column specified by a column index with a null value.

Parameters
columnIndex int: the index of the column to update.
Throws
SQLException if a database error happens.

updateObject

Added in API level 1
void updateObject (int columnIndex, 
                Object x)

Updates a column specified by a column index with an Object value.

Parameters
columnIndex int: the index of the column to update.
x Object: the new value for the specified column.
Throws
SQLException if a database error happens.

updateObject

Added in API level 1
void updateObject (int columnIndex, 
                Object x, 
                int scale)

Updates a column specified by a column index with an Object value.

Parameters
columnIndex int: the index of the column to update.
x Object: the new value for the specified column.
scale int: for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits after the decimal point.
Throws
SQLException if a database error happens.

updateObject

Added in API level 1
void updateObject (String columnName, 
                Object x, 
                int scale)

Updates a column specified by a column name with an Object value.

Parameters
columnName String: the name of the column to update.
x Object: the new value for the specified column.
scale int: for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits after the decimal point.
Throws
SQLException if a database error happens.

updateObject

Added in API level 1
void updateObject (String columnName, 
                Object x)

Updates a column specified by a column name with an Object value.

Parameters
columnName String: the name of the column to update.
x Object: the new value for the specified column.
Throws
SQLException if a database error happens.

updateRef

Added in API level 1
void updateRef (int columnIndex, 
                Ref x)

Updates a column specified by a column index with a java.sql.Ref value.

Parameters
columnIndex int: the index of the column to update.
x Ref: the new value for the specified column.
Throws
SQLException if a database error happens.

updateRef

Added in API level 1
void updateRef (String columnName, 
                Ref x)

Updates a column specified by a column name with a java.sql.Ref value.

Parameters
columnName String: the name of the column to update.
x Ref: the new value for the specified column.
Throws
SQLException if a database error happens.

updateRow

Added in API level 1
void updateRow ()

Updates the database with the new contents of the current row of this ResultSet object.

Throws
SQLException if a database error happens.

updateRowId

Added in API level 9
void updateRowId (String columnLabel, 
                RowId value)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
value RowId
Throws
SQLException

updateRowId

Added in API level 9
void updateRowId (int columnIndex, 
                RowId value)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
value RowId
Throws
SQLException

updateSQLXML

Added in API level 9
void updateSQLXML (int columnIndex, 
                SQLXML xmlObject)

Updates the value at the 1-based columnIndex. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnIndex int
xmlObject SQLXML
Throws
SQLException

updateSQLXML

Added in API level 9
void updateSQLXML (String columnLabel, 
                SQLXML xmlObject)

Updates the value in the named column. The underlying database isn't changed until the next row update or insert operation.

Parameters
columnLabel String
xmlObject SQLXML
Throws
SQLException

updateShort

Added in API level 1
void updateShort (int columnIndex, 
                short x)

Updates a column specified by a column index with a short value.

Parameters
columnIndex int: the index of the column to update.
x short: the new value for the specified column.
Throws
SQLException if a database error happens.

updateShort

Added in API level 1
void updateShort (String columnName, 
                short x)

Updates a column specified by a column name with a short value.

Parameters
columnName String: the name of the column to update.
x short: the new value for the specified column.
Throws
SQLException if a database error happens.

updateString

Added in API level 1
void updateString (int columnIndex, 
                String x)

Updates a column specified by a column index with a String value.

Parameters
columnIndex int: the index of the column to update.
x String: the new value for the specified column.
Throws
SQLException if a database error happens.

updateString

Added in API level 1
void updateString (String columnName, 
                String x)

Updates a column specified by a column name with a String value.

Parameters
columnName String: the name of the column to update.
x String: the new value for the specified column.
Throws
SQLException if a database error happens.

updateTime

Added in API level 1
void updateTime (int columnIndex, 
                Time x)

Updates a column specified by a column index with a Time value.

Parameters
columnIndex int: the index of the column to update.
x Time: the new value for the specified column.
Throws
SQLException if a database error happens.

updateTime

Added in API level 1
void updateTime (String columnName, 
                Time x)

Updates a column specified by a column name with a Time value.

Parameters
columnName String: the name of the column to update.
x Time: the new value for the specified column.
Throws
SQLException if a database error happens.

updateTimestamp

Added in API level 1
void updateTimestamp (int columnIndex, 
                Timestamp x)

Updates a column specified by a column index with a Timestamp value.

Parameters
columnIndex int: the index of the column to update.
x Timestamp: the new timestamp value for the specified column.
Throws
SQLException if a database error happens.

updateTimestamp

Added in API level 1
void updateTimestamp (String columnName, 
                Timestamp x)

Updates a column specified by column name with a Timestamp value.

Parameters
columnName String: the name of the column to update.
x Timestamp: the new timestamp value for the specified column.
Throws
SQLException if a database error happens.

wasNull

Added in API level 1
boolean wasNull ()

Determines whether the last column read from this ResultSet contained SQL NULL.

Returns
boolean {@code true if the last column contained SQL NULL, false otherwise
Throws
SQLException if a database error happens.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.