• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Result Set

 
jodi blair
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know of an instance where closing the PreparedStatement does not close the result set? Please let me know, we seem to have open cursors and have heard of others having the same problem. Thanks, Jodi
 
Dorj Galaa
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
statement.close();
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle has some internal problems with prepared statements. On many occasions, even though you close the resultset and prepared statements, the cursors remain open. Soon you will get "Ora-1000 max number of cursors exceeded" or something to that effect. There are 3 workarounds:
1. set max number of open cursors in Oracle to a high number (at least 200... the default is 40ish) as this does not effect performance of the DB.
2. force a rollback: connection.rollback()
3. close the connection: connection.close()
hope this helps
Jamie
 
jodi blair
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your suggestion, we will investigate this further. We have seen that Oracle error. Jodi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic