File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes how to pass a resultset object in a function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to pass a resultset object in a function" Watch "how to pass a resultset object in a function" New topic
Author

how to pass a resultset object in a function

MuraliH Krishna
Greenhorn

Joined: Jan 19, 2008
Posts: 9
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

Joined: Apr 16, 2008
Posts: 2187
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

Joined: May 26, 2003
Posts: 31079
    
163

James is correct. It is better design for the ResultSet object to stay in the database layer.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to pass a resultset object in a function