More specifically,
> > finally {
> > if (con != null) {
> > con.close(); }//endif
> > if (stmt != null) {
> > stmt.close();}//endif
> > }//endfinally
The close() methods also throw SQLException... and you do not
have a try/catch block around these. Here's what I usually do:
try { if (stmt!=null) stmt.close(); } catch (SQLException ex) { }
try { if (con!=null) con.close(); } catch (SQLException ex) { }
Note the order. You should close the statement *before* the
connection.
-eric
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html