Hi all,

Its always better to explicitly close the ResultSet. I have followed the
just closing the statement approach and have still got the max open cursors
error with Oracle.

Pranav
At 09:46 AM 1/31/2003 -0500, you wrote:
>Cosmin Cremarenco <[EMAIL PROTECTED]> wrote:
>
>> I agree that the Statement and the PreparedStatement must be
>> explicitly closed. But what about the ResultSet. How come the following
>> piece of code works?
>> ...
>
>According to the SDK v1.4.1 API documentation for the ResultSet
>interface:
>
>"A ResultSet object is automatically closed when the Statement object
>that generated it is closed, re-executed, or used to retrieve the
>next result from a sequence of multiple results."
>
>So, assuming that Oracle and other have implemented the interface
>correctly, which I presume they have, there should be no need to
>close the ResultSet if the Statement is closed.  There should not be
>a resource leak.
>---
>Alan Meyer
>AM Systems
>Randallstown, MD
>U.S.A.
>
>===========================================================================
>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

===========================================================================
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