Thread: PostgreSQL JDBC drive does not fully support JDK1.3

PostgreSQL JDBC drive does not fully support JDK1.3

From
Raymond Chui
Date:
I am using PostgreSQL JDBC drive jdbc7.0-1.2.jar on Redhat Linux 6.5
with PostgreSQL 7.0.3-2

When I

ResultSet result = statement.executeQuery(sqlStatement);

int fromRow = 10;
int toRow = 20;
// my SQL statement returns few thousand rows to ResultSet
// I only want to display result.next() fromRow to toRow

result.absolute(fromRow)
int rowNumber = result.getRow();
out.println("Current row = " + rowNumber);
// Here is the problem, the result.absolute(int i) never go the row
number i
// It always stay in row 0 !!


while(result.next()) {
    rowNumber = result.getRow();
    if (rowNumber > toRow)
        break;
    // else display rows
    // ......
}



--Raymond


Attachment