Re: NullPointerException when calling ResultSet.absolute(int)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: NullPointerException when calling ResultSet.absolute(int)
Date: 2005-08-29 22:23:56
Message-ID: 43138AFC.20305@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Clemens Eisserer wrote:
> Hello Oliver and thanks a lot for answering,
>
>
>>Either you can use two queries, or use a scrollable ResultSet and call
>>ResultSet.last() / ResultSet.getRow(). The second approach causes the
>>entire ResultSet to be loaded into the Java heap, though, so it's not so
>>good for large results.
>
> Currently I use the last()/getRow approach but as you confirmed this
> approach does exactly what I don't want - to transfer the whole
> selection between server and client.
> Isn't there a workarround for this, maybe setting the fetch-size
> (default set to 0)?

Not with the current driver -- using a scrollable resultset disables use
of cursors, so the fetchsize is ignored.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Hina Chauhan 2005-08-30 06:22:48 max connection
Previous Message Kris Jurka 2005-08-29 19:03:39 Re: username and password for postgresql jdbc FTP site