Hello everyone,
Let me say that I know how to obtain the row count of a ResultSet. It's been covered many times in this forum, and Sun provides an
answer on the
JDBC FAQ page.
Though I formulated this question a very long time ago, I've never asked: Why doesn't ResultSetMetaData provide a row count?
Do databases provide such metadata about the results of a query? If not, why not? Why must we incur the expense (even when it is minimal) of iterating the ResultSet, either via many calls to next() or via last() and getRow(), to obtain information that is more often than not extremely valuable to the consumer of the ResultSet? Finally, can we expect that such an API will be available in a future version of JDBC?
As I said earlier, I know how to obtain the row count of a ResultSet. I don't have any problems to solve, merely an old curiosity that I hope to satisfy. Feel free to spend your time on posts whose purpose is to solve problems.
Thanks for your time,
Craig
[ February 18, 2003: Message edited by: Craig Demyanovich ]