This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass a resultset object in a function  RSS feed

 
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
Sheriff
Posts: 37222
519
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
Boost this thread!