• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

close on CachedRowSet

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have some code that had lots of (oracle) database accesses. I encountered 'too many open cursors' errors. Although i checked thoughroghly, i think i was missing out on closing some resources. I changed my source code to have a single method that executed queries and returned a CachedRowSet. My question is, being a disconnected resultset is it absolutely necessary to close the CachedRowSet? I did close the Statement objects and ResultSet objects from which i got the CachedRowSet object. Wont just resetting the old CachedRowSet with a new one be ok? Something like:-



Thanks
Neville
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
having scaned the documentation and example for cached row set, it appears to be a hybrid of a statement and result set all in one.
I think it deffinatley needs closing.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic