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  isLast() and last() methods  behavior? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark " isLast() and last() methods  behavior?" Watch " isLast() and last() methods  behavior?" New topic

isLast() and last() methods behavior?

Tom Barns
Ranch Hand

Joined: Oct 27, 2000
Posts: 138
Hi All
I'm trying to use ResultSet,when i call last() or isLast()
i do not get any response,what i think at least i should get tru or false ,or what i want which is i need to move the curser to last row,these for example,but i tried also different methods too and i did not get the right return type from them.
any help will be appreciated.

Thanks for your help.
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
You should post some code here and any error messages you are getting. When you execute last() and isLast() on a ResultSet you should get true or false as a return type.

SOURCE CODE should be SURROUNDED by "code" tags.
Gils Roy

Joined: Dec 13, 2002
Posts: 1
Hi Toms Barns
I just come to have the same problem. I resolve it of this manner.
ResultSet rset=.......
while (rset_hasData){
String debut=rset.getString(1);
String fin=rset.getString(2);;
After the while, the cursor is moved to last row and I capture the contents of the two first fields of the request.
I agree. Here's the link:
subject: isLast() and last() methods behavior?
It's not a secret anymore!