Proper sequence should be
resultset
statement
connection

if you diretly close the connection, then your code may behave differently
depending upon the driver. Closing the connection in finally block may give
you exception. You should always put in try block. whether connection is
closed or not is not sure but your code in finally block will always be
executed .

regds
Ashwani

----- Original Message -----
From: "vijay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 11:56 AM
Subject: Re: JDBC Connection close


> hi,
>
> if u close the connections in finally block, then it will be closed
> successfully. there will be no connections opened. its advisable to close
> the connection after closing other things
>
> thanks & regards
> vijayanand.R
>
>     (),,,()
>    ( (.  .)     .-''''''''''-.
>   (    o  ) ) (    'o'   )
> =(,,)=(,,)=(,,)==(,,)=
> ----- Original Message -----
> From: "Manoj Nahar" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 14, 2002 11:38 AM
> Subject: JDBC Connection close
>
>
> Hi there,
>
> Does it make aby difference if i close the JDBC connection without closing
> all the resultsets and statements.
>
> I am closing connections is try catch finally. Is it possible that
> connections are left open even after closing them in finally
>
> Manoj Nahar
> http://www.naharonline.com
>
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.361 / Virus Database: 199 - Release Date: 5/7/2002
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  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 FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to