I would like to print the number of records from a resultset. What i have now prints the actual details from the database based on the query passed. below is the snippet of code that does that:
1. We have a forum called JDBC which is where this thread should be. I am going to move this for you. This forum is for Servlets questions only.
2. You don't need to shout in your Thread Topic title. It is not considered good manners to yell in forums. I am going to edit your title so that it is proper case.
Hi, try this.Put the resultSet in an ArrayList and call size(). this will print you the no of Records in an ArrayList cheers, Sachin
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
posted
0
See vernon needs only the Row count in the result set, so why to get all the records from the database & put it in a arraylist then get it's size. This query is sufficient right ?