Re: unusual ResultSet.next() behaviour - Mailing list pgsql-jdbc

From emergency.shower@gmail.com
Subject Re: unusual ResultSet.next() behaviour
Date
Msg-id bdf1a098050728055671a8dffa@mail.gmail.com
Whole thread Raw
In response to unusual ResultSet.next() behaviour  ("Les Carter" <carterl@newkinetics.com>)
List pgsql-jdbc
On 7/27/05, Les Carter <carterl@newkinetics.com> wrote:
> This is a multi-part message in MIME format. --bound1122440425 Content-Type:
> text/html; charsetiso-8859-1 Content-Transfer-Encoding: quoted-printable
> Consider the following code snippet where rs is a ResultSet object obtained
> from a previous query:
>
>     for(int count=0; count!=someValue; count++)
>     {
>         if(!rs.next()) throw SomeException();
>     }
>     rs.next();
>
> Pretty simple, just cycle through someValue number of records and then get
> the next record after that.

I suspect that this isn't the code that actually produces the error.
If SomeException() is a constructor, this code wouldn't compile. Could
you post a more complete snippet?

-Alex

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Problems storing timestamps with calendars
Next
From: Dave Cramer
Date:
Subject: Proposed patch for showing originating query on error