• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Result set getting closed

 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • 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
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic