Update of /cvsroot/queryviewer/queryviewer/src/net/sourceforge/queryviewer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2724
Modified Files:
JDBCConnectionImpl.java
Log Message:
fermeture du statement
Index: JDBCConnectionImpl.java
===================================================================
RCS file: /cvsroot/queryviewer/queryviewer/src/net/sourceforge/queryviewer/JDBCConnectionImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** JDBCConnectionImpl.java 23 Jun 2004 11:12:24 -0000 1.5
--- JDBCConnectionImpl.java 23 Jun 2004 13:46:06 -0000 1.6
***************
*** 1,7 ****
- /* Created on 14-mai-2003
- */
package net.sourceforge.queryviewer;
-
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
--- 1,4 ----
***************
*** 54,59 ****
throws QueryException {
String[][] data = null;
try {
! java.sql.Statement stmt = this.connection.createStatement();
if ( stmt.execute( queryString ) ) {
// resultset
--- 51,57 ----
throws QueryException {
String[][] data = null;
+ java.sql.Statement stmt = null;
try {
! stmt = this.connection.createStatement();
if ( stmt.execute( queryString ) ) {
// resultset
***************
*** 84,88 ****
} catch(SQLException sqlex) {
throw new QueryException(sqlex);
! }
return data;
}
--- 82,96 ----
} catch(SQLException sqlex) {
throw new QueryException(sqlex);
! } finally {
! try
! {
! stmt.close();
! }
! catch (SQLException sqlex)
! {
! throw new QueryException(sqlex);
! }
!
! }
return data;
}
|