• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with isLast()!

 
Brian Smith
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
here are my codes snippets;

i don't get it why the use of rs.isLast() throws exception. is it wrong to use this way? Please help me with this.
thanks.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Throws what exception?
Also, do you realize that with your rs.next() calls, you are skipping every other record?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not all database drivers support rs.isLast()
 
Brian Smith
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have codes like this:

After i reach the last record and click the next button again, it throws the following exception:[Microsoft][ODBC Driver Manager] Invalid cursor state
what i want to do is check if this is the last record. if this is the last record, display a message that this is the last record otherwise keep displaying the next record.
how do i implement this idea? please help me with this.
thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic