This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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.
Hrithik Roshan
Greenhorn
Joined: Dec 12, 2001
Posts: 23
posted
0
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]