Hitachi

Hitachi Advanced Database Application Development Guide


8.5.4 beforeFirst()

Organization of this subsection

(1) Function

This method moves the cursor to the location immediately preceding the first row in the ResultSet object. The following table shows the location to which the cursor is moved when this method is executed.

Table 8‒17: Location to which the cursor is moved when the beforeFirst method is executed

Number of rows in result set#

Current cursor position

Destination of cursor

0

Before the first row

Remains before the first row.

n

Before the first row

Remains before the first row.

1 ≤ current row ≤ n

Before the first row

After the last row

Before the first row

#

If the actual number of rows is greater than the setMaxRows value, the setMaxRows value takes effect.

If the actual number of rows is greater than the setLargeMaxRows value, the setLargeMaxRows value takes effect.

(2) Format

public synchronized void beforeFirst() throws SQLException

(3) Arguments

None.

(4) Return value

None.

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: