Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to pass a resultset object in a function

 
MuraliH Krishna
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Ranchers,
I have a requirment of passing a resultset object to a function. When I try to access the resultset object in the receiving end, I am getting an error like closed resultset cannot be accessed. I can understand that we pass a reference to the calling function but is there a way to pass the resultset object and its data.Can some one help me please. its very urgent.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is better to copy the data from the ResultSet into a Collection class. You can then pass a reference to this Collection class to the function.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James is correct. It is better design for the ResultSet object to stay in the database layer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic