• 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

Result set getting closed

 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai
I executed a query to get a ResultSet1 using some connection and statement settings. Using same settings when i executed some other query first result set in automatically closed. This seems to be default behaviour.
My requirement is like follows.
--Execute some stored procedures.
-- Then process each result set
using same connection and statement. Problem here is once i run some query previous Result set is getting closed and I am unable to do anything with previous resultset later.
Can anybody suggest how best I can solve this problem following same sequence of steps?
Awaiting your valuable inputs.
Thanks and Rgds
Manohar
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A resultset is connected to a statement object. Once that statement is reused the resultset is lost. You can either create another statement object or store/persist your resultset to a collection or so.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic