Re: Nmber of rows in a ResultSet

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Nmber of rows in a ResultSet
Дата
Msg-id Pine.LNX.4.33.0401090323370.6759-100000@leary.csoft.net
обсуждение исходный текст
Ответ на Nmber of rows in a ResultSet  ("Xavier Bugaud" <xavier.bugaud@gloptv.com>)
Список pgsql-jdbc

On Fri, 9 Jan 2004, Xavier Bugaud wrote:

> Hi all,
>
> JDBC does not allow to directly retrieve the number of rows in a
> ResultSet.
> However, in old Postgres JDBC drivers (pgjdbc2.jar), the number of rows
> contained in a ResultSet could be obtained by calling getFetchSize().

This was just an implementation artifact and the javadoc for the method
should have made you wary of using it in the way you are.

> In the last JDBC drivers, is there a means to get the number of rows
> directly (without using 'SELECT COUNT(*)' or 'rs.last();rs.getrow();') ?

I don't see what's so wrong with rs.last() and rs.getRow().

Kris Jurka


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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: PreparedStatement parameters and mutable objects
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: [BUG] - Invalid UNICODE character sequence found (0xc000)