This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes copying the contents of Resultset object to another Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "copying the contents of Resultset object to another" Watch "copying the contents of Resultset object to another" New topic
Author

copying the contents of Resultset object to another

Prakash Rao Laknepalli
Greenhorn

Joined: Aug 01, 2006
Posts: 3
Hi,

Is there any way to copy the contents(fully/partially) one Resultset object to another say, like i want to copy 10th to 20th records of rs1 to rs2.
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Originally posted by Prakash Rao Laknepalli:
Hi,

Is there any way to copy the contents(fully/partially) one Resultset object to another say, like i want to copy 10th to 20th records of rs1 to rs2.


Not with standard JDBC. ResultSets are not copyable or clonable. It's remotely possible that a particular driver might have methods to allow this, but no driver I'm familiar with does, and there are lots of good technical reasons not to with many databases.

ResultSets should be thought of as a wrapper class around a network connection; in many implementaions, the results are fetched as needed over the network.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: copying the contents of Resultset object to another
 
Similar Threads
ResultSet Question
Collection frramework
Setting a JAVA Class to a MAIN class
how to copy/cut a selected node from Jtree
Is there a way of storing a resultset in a variable (not copying into arrays etc.)