Only when you call the rs.next() the next record is fetched.  If connection
is closed rs.next() will not fetch records. For such a case, you can use the
RowSet class which uses disconnected resultset.
Regards,
Partha

-----Original Message-----
From: Abdul jeelani [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 07, 2004 12:48 PM
To: [EMAIL PROTECTED]
Subject: resultset question


Hi,

One basic question:

String query = "Select * from table";
ResultSet rs = statement.executeQuery(query);

Now, suppose the query returns 10,000 records. Whether the resultset will
hold all the 10,000 records in memoy (RAM - stack, heap or cache does not
matter)., or whenever a rs.next() is called it gets the next record from the
database. If the connection.close() is executed after the query is executed,
will rs.next() be able to get next records.

Regards,
Jeelani

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to