//... try{ //…diverse SQL-Anweisungen } catch(SQLException ex){ // Behandlung des SQL-Fehlers } finally { try{ // ResultSet schließen (wenn vorhanden) if(rset != null) { rset.close(); } } catch(SQLException ex){ } try{ // Statement schließen if(stmt != null) { stmt.close(); } } catch(SQLException ex){ } try{ // Connection schließen (falls nötig) if(conn != null) { conn.close(); } } catch(SQLException ex){ } } //...