• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

What object is used in a JDBC ResultSet and how does one get it?

Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm contemplating a producer-consumer application to move data from one DBMS to another. I want to run a query on the producer DB and use the results to build and execute an insert on the consumer DB.

I would like the producer thread to enqueue each 'row' of the result set. The consumer thread will remove 'rows' and use them to run inserts.

Looking at the ResultSet JavaDoc I don't see a method for getting a 'row' or the object that corresponds to a row.

Is this possible?

Posts: 70327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about the next() method? You would have to create an object to encapsulate each row; the columns in each row are different from one "select" to another.
yeah, but ... what would PIE do? Especially concerning this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic