Hitachi

Hitachi Advanced Database Application Development Guide


8.3.40 setMaxRows(int max)

Organization of this subsection

(1) Function

This method sets the maximum number of rows that can be stored in a ResultSet object created from this Statement object, as int data. Any rows in excess of this value are not stored in the ResultSet object (and without notification).

The setting specified by this method is not applied to ResultSet objects that have already been created.

(2) Format

public synchronized void setMaxRows(int max) throws SQLException

(3) Arguments

int max

Specifies the maximum number of rows that can be stored.

If 0 is specified, no maximum number of rows that can be stored is set. If the result set type is ResultSet.TYPE_SCROLL_INSENSITIVE, the maximum number of rows that can be stored is set to Integer.MAX_VALUE even if 0 is specified here.

If this method is not executed, 0 (no maximum number of rows that can be stored is set) is assumed.

(4) Return value

None.

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: