File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes how can I get the record number of resultset? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how can I get the record number of resultset?" Watch "how can I get the record number of resultset?" New topic
Author

how can I get the record number of resultset?

Winny Zhang
Greenhorn

Joined: Aug 22, 2003
Posts: 2
I won't like to get the record number of resultset using:
int i=0;
while(rs.next()){
i++;
}
or this:
ResultSet rs;
int count;
��
rs.last();
count = rs.getRow();
��
have any good idea? thanks a lot!
Winny


be a good java programmer
F A H A D
Greenhorn

Joined: Aug 16, 2003
Posts: 13
i don't what u r trying to ask....u want to know on which row of Database u r resultset is on...RIGHT....if this the case the
int i=0;
int countRow=0;
while (rs.next())
System.out.println(countRow);
i++;
}
hope this helps....
Bye


no GOD except ALLAH...
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Zero Degree",
Your display name does not comply to the JavaRanch naming standards. You can view the rules here
Please change your display name. Accounts with invalid display names get deleted.
Also, please try to reduce your usage of contractions such as u, r, ur etc. Many of the Ranch users do not have English as their primary language, and it is a good idea try to make communication easier, not harder.
thanks,
Dave.
Winny Zhang
Greenhorn

Joined: Aug 22, 2003
Posts: 2
I mean I hope to get the record number of the resultset,and don't use that two ways .

Thanks!
My english is not very good .sorry
Winny
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can I get the record number of resultset?