Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes resultset 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 "resultset" Watch "resultset" New topic
Author

resultset

anu manju
Greenhorn

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
Greenhorn

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

Joined: May 03, 2002
Posts: 42
Anu,
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: http://aspose.com/file-tools
 
subject: resultset
 
Similar Threads
Resultset
handle empty recordset
Problem in getting multiple resultsets from Oracle Stored Procedure
how can show the data in database to jtable??
JSP & JDBC