Hitachi

Hitachi Advanced Database Application Development Guide


8.3.22 getMaxRows()

Organization of this subsection

(1) Function

This method acquires 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).

If the value specified in the setLargeMaxRows method exceeds Integer.MAX_VALUE, use the getLargeMaxRows method instead of the getMaxRows method. If you use the getMaxRows method, it will return 0 if the number of rows exceeds Integer.MAX_VALUE.

(2) Format

public synchronized int getMaxRows() throws SQLException

(3) Arguments

None.

(4) Return value

This method returns the maximum number of rows that can be stored in a ResultSet object created from this Statement object, as int data. The value set in the setMaxRows or setLargeMaxRows method is returned. A value of 0 means that no maximum number of rows has been set.

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: