hi, java Ranchers i want to get the count of the rows in the resultSet without iterating through the resultset.next() any suggestion is welcome! thanx!! ------------------
Two suggestions: Either perform the query as a count(*) first to get the number returned then perform the real query (ie make two queries, less efficient but not too bad if you do it efficiently) Or, if you have a driver that supprts JDBC2.0 or later, you can jump to the end of the ResultSet and find out what row number that is. Dave.
Originally posted by David O'Meara: Two suggestions: Either perform the query as a [b]count(*) first to get the number returned then perform the real query (ie make two queries, less efficient but not too bad if you do it efficiently) Or, if you have a driver that supprts JDBC2.0 or later, you can jump to the end of the ResultSet and find out what row number that is. Dave.[/B]
thanx Dave!! //:~
this llama doesn't want your drama, he just wants this tiny ad for his mama
a bit of art, as a gift, the permaculture playing cards