Re: Resultset funnies... - Mailing list pgsql-jdbc

From Zak McGregor
Subject Re: Resultset funnies...
Date
Msg-id 20030908153608.499bc116.zak@mighty.co.za
Whole thread Raw
In response to Resultset funnies...  (Zak McGregor <zak@mighty.co.za>)
List pgsql-jdbc
On Mon, 8 Sep 2003 15:25:47 +0200
Zak McGregor <zak@mighty.co.za> wrote:

> Hi all
>
> What am I doing wrong in the code below? The 2nd while(rs.next()) loop isn't
> entered at all, and I definitely have 1 row returned. Any help much
> appreciated, thanks :)

[snip]

>     rs.first();
>     System.out.println("Here...");
>     while(rs.next()) {
>         for (i=1; i <= numCols ; i++) {

...

Changing the above instance of first() to beforeFirst() seems to have fixed my
problem.

Ciao

--
========================================================================
http://www.carfolio.com/        Searchable database of 10 000+ car specs
Auctioning motoring-related items at eBay? http://www.carfolio.com/ebay/
========================================================================

pgsql-jdbc by date:

Previous
From: Zak McGregor
Date:
Subject: Resultset funnies...
Next
From: "James Brittle"
Date:
Subject: Copy Command