This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes how to find no of records present in resultset objet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to find no of records present in resultset objet" Watch "how to find no of records present in resultset objet" New topic
Author

how to find no of records present in resultset objet

Baazi Reddy
Greenhorn

Joined: Jun 28, 2012
Posts: 11
Hai This gopal Iam developing View and Search module for technology forum.

In the view page I want to display number of threads are there for view, by some query Iam able to get records to resultset object.
Using resultset.next and adding those records to Dto object using setter methods, dto is added to list and list to transferred to next layer..
so I want to dispaly no of records present in resultset object and last() and getRow() methods but unable to add this Dto object.

Can any solve this problem for me Iam very thankful to them.
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19693
    
  10

So you read through the ResultSet, convert each row into an object, and add each object to a list?

In that case the number of rows in the ResultSet is exactly equal to the number of records you added to the list, isn't it? And if this list is any good at all, you should be able to find out how many objects are in the list. So I'm not clear about what your problem is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to find no of records present in resultset objet
 
It's not a secret anymore!