File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes number  of rows   Resultset ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "number  of rows   Resultset ???" Watch "number  of rows   Resultset ???" New topic

number of rows Resultset ???

Bhiku Mhatre
Ranch Hand

Joined: Apr 08, 2002
Posts: 127
how do I know number of results fetched by query?? Is there any method in ResultSet class ??

The difference between winner and loser is making things happen and letting things happen.
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
u dont have a method directly which gives u the
Row count by a resultset.u can get the rowcount
in oracle using
for a query.
well ,if u want to know the number of records fetched ,then use a local variable and keep it in loop thru
variable ++
print out the variable.

Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
See my code:

subject: number of rows Resultset ???
It's not a secret anymore!