File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

number of rows Resultset ???

 
Bhiku Mhatre
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do I know number of results fetched by query?? Is there any method in ResultSet class ??
 
Rajendar Goud
Ranch Hand
Posts: 220
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 291
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See my code:
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic