Home > Archive > PostgreSQL JDBC > July 2005 > Re: unusual ResultSet.next() behaviour









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: unusual ResultSet.next() behaviour
emergency.shower@gmail.com

2005-07-28, 7:24 am

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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com