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 resultset 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 "resultset" Watch "resultset" New topic


anu manju

Joined: May 03, 2003
Posts: 8
how to find out the end of resultset without using next() method.
may i open resultset within while loop another resultset.
Sarthishari Kumar

Joined: Apr 21, 2003
Posts: 19
Did u try resultset.isLast().
This will return a TRUE Boolean value if the Resultset has reached the last Record.
Hope this helps
Chris Smith
Ranch Hand

Joined: May 03, 2002
Posts: 42
To answer the second part of your question, if you use executeQuery again on the *same* statement, it will close the previous ResultSet. So no, you can't use another ResultSet from the SAME STATEMENT in a loop over a prior ResultSet. However, there's nothing preventing you from using multiple statements within a connection.
I'm wondering what this has to do with Servlets. Perhaps it would be better continued in a different category?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Yup.. moving from Servlets -> JDBC
I agree. Here's the link:
subject: resultset
It's not a secret anymore!