> Hi! In jdbc, how to know the number of rows a query retrieved? Is there
> a good way other than using ResultSet.next()?

Using Village, I do this:

QueryDataSet qds = new QueryDataSet(connection, "select * from table");
qds.fetchRecords();

int size = qds.size();

qds.close();

the int size will have the number of records fetched. you can also
(optionally) pass the number of records (as well as the starting point) that
you want to fetch to the fetchRecords() method. example: that is cool if you
only want to fetch the first 20 records starting at record 10.

<http://www.working-dogs.com/village/>

-jon

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to