• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

copying the contents of Resultset object to another

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic