From: Oliver Jowett <oliver@opencloud.com>
To: Alban Mathieu <alban@alliancegraphique.ch>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Driver JDBC3 build 213 for postgreSQL 7.4
Date: Fri, 21 May 2004 17:15:35 +1200
Message-ID: <40AD9077.7090905@opencloud.com> (raw)
In-Reply-To: <C8DC433C-A997-11D8-803B-000D93AD2D18@alliancegraphique.ch>
References: <C8DC433C-A997-11D8-803B-000D93AD2D18@alliancegraphique.ch>
Alban Mathieu wrote:
> Hi,
>
> I got some troubles with the jdbc driver build 213 for postgreSQL 7.4
> The method ResultSet.getFetchSize() return always 0
>
> I use now the driver for postgreSQL 7.3 and evrything is working fine...
>
> Any idea???
If you are expecting getFetchSize() to return the size of the resultset,
that was nonstandard behaviour in the older driver. Newer drivers follow
the JDBC API specification and return whatever was set by setFetchSize()
(or an unspecified default value).
To get the resultset size portably, try something like:
PreparedStatement stmt =
connection.prepareStatement("...",
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
// .. set parameters ..
ResultSet rs = stmt.executeQuery();
rs.last();
int resultSetSize = rs.getRow();
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, alban@alliancegraphique.ch
Subject: Re: Driver JDBC3 build 213 for postgreSQL 7.4
In-Reply-To: <40AD9077.7090905@opencloud.com>
References: <C8DC433C-A997-11D8-803B-000D93AD2D18@alliancegraphique.ch> <40AD9077.7090905@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox