wood burning stoves 2.0*
The moose likes JDBC and the fly likes What object is used in a JDBC ResultSet and how does one get it? 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 "What object is used in a JDBC ResultSet and how does one get it?" Watch "What object is used in a JDBC ResultSet and how does one get it?" New topic
Author

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

William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
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?

-=beeky
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38033
    
  22
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What object is used in a JDBC ResultSet and how does one get it?
 
Similar Threads
When utilizing all cores - speed of execution decrease significantly. Why?
Blocking queue Implementation
Is there a way to check how the mac is assigning/utilizing the processors?
Data exchange happening of two objects
threads synchronization problem