File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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