Hi
I am using a PreparedStatement and I wonder if I should close it after each query I make with it. Or is it automatically closed when I assign a new query to it?
PreparedStatement pstmt = null;
ResultSet rs = null;
pstmt = con.prepareStatement("bla bla SQL query 1");
rs = pstmt.executeQuery();
// Should I write pstmt.close() here?
pstmt = con.prepareStatement("bla bla SQL query 2");
rs = pstmt.executeQuery();
}finally{pstmt.close()}