aspose file tools
The moose likes JDBC and the fly likes number  of rows   Resultset ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "number  of rows   Resultset ???" Watch "number  of rows   Resultset ???" New topic
Author

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
Hi
u dont have a method directly which gives u the
Row count by a resultset.u can get the rowcount
in oracle using
count(*)
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
while(rs.next)
variable ++
print out the variable.

Raj
Elahe Shafie
Ranch Hand

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


Thanks,
Elahe
 
 
subject: number of rows Resultset ???
 
Threads others viewed
ResultSet object
total records in a result set
Count the Records
Resultset row count
ResultSet object
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture