aspose file tools*
The moose likes JDBC and the fly likes isLast method for result set is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "isLast method for result set is not working" Watch "isLast method for result set is not working" New topic
Author

isLast method for result set is not working

Shahnawaz Shakil
Ranch Hand

Joined: Aug 04, 2008
Posts: 57
Hi,
I am trying to retrieve data (Sybase database) from my web application something as below:


It seems that result.isLast() method is not working and throwing UnimplementedOperationException. Please suggest.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You driver does not implement that method. To fix this you can hunt around for a suitable driver that does - I'm afraid I have no idea if one exists for Sybase - or you can change your logic to achieve what you want.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Shahnawaz Shakil
Ranch Hand

Joined: Aug 04, 2008
Posts: 57
Hi Paul,
I think you are right that it does not exist for sybase. Could you please suggest some logic because i need to come out of the loop once i reach the last row? I don't know how will i come to know if i have reached to the last row without using isLast method. Please help.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

Shahnawaz Shakil wrote:Could you please suggest some logic because i need to come out of the loop once i reach the last row?




Can you tell us what is the purpose of this loop? You need to get less than 5 records or what?

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2500
    
    8

know if i have reached to the last row
When rs.next() == false

We usually travel a resultset using this logic


OCUP UML fundamental and ITIL foundation
youtube channel
Shahnawaz Shakil
Ranch Hand

Joined: Aug 04, 2008
Posts: 57
Vijitha,
Yes i need to get latest five records or less. Reason for using this for loop.

Thanks Jan and Paul for your help. I have changed the logic and its working fine.

Thanks you all for your help and suggestions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: isLast method for result set is not working