8.5.45 getRow()
- Organization of this subsection
(1) Function
This method acquires the current row number, such as 1 for the first row, 2 for the second row, and so on. If the row is before the first row or after the last row, the number that is acquired is 0.
(2) Format
public synchronized int getRow() throws SQLException
(3) Arguments
None.
(4) Return value
This method returns the current row number. If the current row number is greater than Integer.MAX_VALUE, the method returns Integer.MAX_VALUE.
If the maximum number of retrieved rows exceeds 2,147,483,647, the method returns 2147483647.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
This ResultSet object is closed.
This includes the case where the ResultSet object was closed because the Statement object that created this ResultSet object was closed.
-
The Connection used to create the Statement object that created this ResultSet object has been closed.
-
The ResultSet object has become invalid due to transaction settlement.