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 problem with isLast()! 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 "problem with isLast()!" Watch "problem with isLast()!" New topic

problem with isLast()!

Brian Smith
Ranch Hand

Joined: Oct 26, 2002
Posts: 232
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.
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
Throws what exception?
Also, do you realize that with your calls, you are skipping every other record?

Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31634

Not all database drivers support rs.isLast()

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Brian Smith
Ranch Hand

Joined: Oct 26, 2002
Posts: 232
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.
I agree. Here's the link:
subject: problem with isLast()!