Link to home
Start Free TrialLog in
Avatar of Javin007
Javin007Flag for United States of America

asked on

Java - Fastest way to copy resultset?

Pretty straightforward:

I have two different connections to two different databases, and I need to find the absolute fastest way to move the data from a table in connection 1 to an identical table in connection 2.  

I'm hoping I don't have to go row-by-row with a bajillion "UPDATE" calls to do this.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Javin007

ASKER

But wouldn't the prepared statement require me to loop through the result set record-by-record still?  I was hoping for some sort of more direct "bulk" method.
Well that's how cursors work. Are you talking about Access by any chance?
Sure enough, using the RDBMS's "INSERT INTO" statement I was able to insert to an external database, and it was quite fast.
:)