pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Phil Davis <pmd@azad.demon.co.uk>
To: pgsql-interfaces@postgresql.org
Subject: JDBC getRow returns 0 after first instead of 1
Date: Mon, 31 Jul 2000 13:18:05 +0100
Message-ID: <20000731131805.E1007@gemini.pmdnet> (raw)

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@azad.demon.co.uk



view thread (5+ messages)  latest in thread

Message-ID: <20000731131805.E1007@gemini.pmdnet>
Permalink:  ../20000731131805.E1007@gemini.pmdnet/
Also on:    postgresql.org/message-id/20000731131805.E1007@gemini.pmdnet

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pmd@azad.demon.co.uk
  Subject: Re: JDBC getRow returns 0 after first instead of 1
  In-Reply-To: <20000731131805.E1007@gemini.pmdnet>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox