only close prepared statements after using the resultset