Re: Resultset funnies...

From: Zak McGregor <zak(at)mighty(dot)co(dot)za>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Resultset funnies...
Date: 2003-09-08 13:36:08
Message-ID: 20030908153608.499bc116.zak@mighty.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 8 Sep 2003 15:25:47 +0200
Zak McGregor <zak(at)mighty(dot)co(dot)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/
========================================================================

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message James 2003-09-08 13:49:20 Copy Command
Previous Message Zak McGregor 2003-09-08 13:25:47 Resultset funnies...