This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes problem with isLast()! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem with isLast()!" Watch "problem with isLast()!" New topic
Author

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.
thanks.
Ron Newman
Ranch Hand

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


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

Joined: May 26, 2003
Posts: 30076
    
149

Not all database drivers support rs.isLast()


[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.
thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with isLast()!
 
Similar Threads
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
Inserting Files to Database.
How to find the number of rows in a Resultset object
Please help me the problem in rs.previous
Result Set problems