Re: Driver JDBC3 build 213 for postgreSQL 7.4

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Driver JDBC3 build 213 for postgreSQL 7.4
Дата
Msg-id 40AD9077.7090905@opencloud.com
обсуждение исходный текст
Ответ на Driver JDBC3 build 213 for postgreSQL 7.4  (Alban Mathieu <alban@alliancegraphique.ch>)
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Waldomiro"
Дата:
Сообщение: Why is so fast ? is It magic ?
Следующее
От: henk53602@hotmail.com (henk53)
Дата:
Сообщение: Replicating JDBC proxy