JDBC getRow returns 0 after first instead of 1

From: Phil Davis <pmd(at)azad(dot)demon(dot)co(dot)uk>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: JDBC getRow returns 0 after first instead of 1
Date: 2000-07-31 12:18:05
Message-ID: 20000731131805.E1007@gemini.pmdnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I think the JDBC driver has several bugs around ResultSet row
numbering. According to the JDBC API docs[1] the getRow() method on
ResultSet should return 1 for the first row. Currently it returns zero.

i.e.
if (rs.first())
int n = rs.getRow(); // n is now 0 instead of 1

The same problem exists with the absolute and related methods which
need to be passed 0 to go to the first row but the API docs say it should
be 1.

If I'm wrong could someone please explain what I got wrong.

PS,
Where is the CVS archive for the sources and is there anon access? I could
not find it on the postgresql.org site.

[1] http://java.sun.com/j2se/1.3/docs/api/java/sql/ResultSet.html#getRow()

--
Phil Davis - pmd(at)azad(dot)demon(dot)co(dot)uk

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 2000-07-31 12:20:58 RE: JDBC getRow returns 0 after first instead of 1
Previous Message S.A.Pamungkas 2000-07-31 12:15:56 RE: couldn't load DB driver : null