The ResultSet class is the result of a run of an executeQuery method.

The ResultSet class defines the following methods.

Method

Returns

Description

afterLast():Object

Object

Moves the cursor to the end of the ResultSet object, after the last row. This method has no effect if the result set contains no rows.

beforeFirst():Object

Object

Moves the cursor to the front of the ResultSet object, before the first row. This method has no effect if the result set contains no rows.

first():boolean

Boolean

Moves the cursor to the first row in the ResultSet object. Returns true if the cursor is on a valid row, and false if there are no rows in the result set.

getDate(string):Object

Object

Returns the Date value of a given column name.

getDateAt(number):Object

Object

Returns the Date value of a given column index.

getNumber(string):number

Number

Returns the Number value of a given column name.

getNumberAt(number):number

Number

Returns the Number value of a given column index.

getString(string):string

String

Returns the String value of a given column name.

getStringAt(number):string

String

Returns the String value of a given column index.

getTimestamp(string):Object

Object

Returns the Timestamp value of a given column name.

getTimestampAt(number):Object

Object

Returns the Timestamp value of a given column index.

last():boolean

Boolean

Moves the cursor to the last row in the ResultSet object. Returns true if the cursor is on a valid row, and false if there are no rows in the result set.

next():boolean

Boolean

Moves the cursor down one row. Returns true if the cursor is on a valid row, and false if there are no more rows.

previous():boolean

Boolean

Moves the cursor to the previous row in the ResultSet object. Returns true if the cursor is on a valid row, and false if it is off the result set.

wasNull():boolean

Boolean

Reports whether the last column read had a value of SQL NULL.