This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes ResultSet Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ResultSet Question" Watch "ResultSet Question" New topic
Author

ResultSet Question

Ashwin Tadepalli
Greenhorn

Joined: Feb 01, 2001
Posts: 27
Hi Developers,
I have a question about copying of a resultset object into another ResultSet object. To make it much clear of what I am trying to do, I am retreiving a particular row by using absolute(int) method in a given Scrollable ResultSet object(rs1).Now I want to store somehow the values of that particular row only in a ResultSet object only(either rs1 or in a different one).For this, I was trying to use another Scrollable ResultSet object(rs2) and copy the contents(just 1 one row) in the manner(rs2=rs1).The main reason that I am trying to store them in a ResultSet object is beacuse I have a helper package which takes that particular ResultSet object and displays it. I am having trouble copying in this manner.Could anyone please suggest me a method for doing this or let me know of where exactly I was going wrong?
Thanking you,
Ashwin
Amit Agrawal
Ranch Hand

Joined: Aug 23, 2001
Posts: 282
just Try RowSet.
Rowset is formaly available with jdbc 3.0 and optionaly available with jdbc 2.0. (jdbc3.0 is builtin jdk1.4).
RowSet is derived interface from resultset and there are three classes who implement it. One of them is CachedRowSet, your purpose can be easily achived using the class.
 
Consider Paul's rocket mass heater.
 
subject: ResultSet Question
 
Similar Threads
copying the contents of Resultset object to another
comparing two ResultSet
Problem in viewing records ?
Query Dependent on first
Statement is closed?