Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

isLast method for result set is not working

 
Shahnawaz Shakil
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Shahnawaz Shakil
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 3918
10
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jan Cumps
Bartender
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
know if i have reached to the last row
When rs.next() == false

We usually travel a resultset using this logic
 
Shahnawaz Shakil
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic