Hello Giuseppe,

Thank you again for the rapid response and helpful advice.

As for the original code, it was exactly what I was looking for i.e. a solution that didn't require further development because I am still learning Java.

Would your code suggestion look something like this?

finally {
try { if (rs != null) rs.close(); } catch (Exception e) {};
try { if (stmt != null) stmt.close(); } catch (Exception e) {};
try { if (conn != null) conn.close(); } catch (Exception e) {};
}

best regards,

longtrain0