Nmber of rows in a ResultSet

From: Xavier Bugaud <xavier(dot)bugaud(at)parabolemaurice(dot)com>
To: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Nmber of rows in a ResultSet
Date: 2004-01-09 06:43:04
Message-ID: 94BCF3512BFBD711B79D004005420B1F0406E0@PMSERVER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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().

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();') ?

Thank you in advance.

Regards
--
Xavier Bugaud
www.gloptv.com

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-01-09 08:18:33 Re: PreparedStatement parameters and mutable objects
Previous Message Xavier Bugaud 2004-01-09 06:28:43 Nmber of rows in a ResultSet