Received: from p1.selectacast.net (IDENT:root@p1.selectacast.net [206.41.1.251]) by hub.org (8.10.1/8.10.1) with ESMTP id e6VFR4B79729 for ; Mon, 31 Jul 2000 11:27:04 -0400 (EDT) Received: from selectacast.net (IDENT:jks@d1 [209.219.91.66]) by p1.selectacast.net (8.9.3/8.9.3) with ESMTP id LAA25326; Mon, 31 Jul 2000 11:26:51 -0400 Message-ID: <39859ABA.759221B4@selectacast.net> Date: Mon, 31 Jul 2000 11:26:50 -0400 From: Joseph Shraibman Organization: Xtenit X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: Phil Davis CC: pgsql-interfaces@postgresql.org Subject: Re: JDBC getRow returns 0 after first instead of 1 References: <20000731131805.E1007@gemini.pmdnet> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/229 What version of the driver are you using? I fixed some off by one errors and my fixes made it into the cvs after 7.0 Phil Davis wrote: > > 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