1
I’m making the following mistake:
java.sql.Sqlexception: ORA-01000: maximum open cursors exceeded
From what I researched, the error happens when the maximum number of cursors is exceeded, and to solve, or Voce increases the number of cursors or closes the connections, and closing the connections would be the best option. My application is in java
the standard of POJO
and DAO
to connect to the oracle database.
My two main doubts are:
If I have to close the PreparedStatement
the methods to include, modify, exclude or only consult (and in the consultation also close the ResultSet
) ?
I can close it like this ?:
PreparedStatement ps = ConexaoOracle.getConexao().prepareStatement(SQL_CONSULTAR);
ps.close();
Yes, the ideal is to close everything, mainly the connection object that should be the one causing the exception.
– romarcio