We help IT Professionals succeed at work.

VISUAL STUDIO VB - Problems with two databases - moving data

I have two problems - my application hooks up to two databases. Cross database querying is not allowed.
1. I am pulling from one database. but need to filter that dataset on ids that exist in the other - so there are no dupes.
my other problem is
2. once I have that dataset - how do I insert it into the other database?
Comment
Watch Question

Senior Developer
Commented:
Create a temporary table and insert the data. Then use that table to query it.
John RugoSenior SQL DBA

Commented:
Create two datasets/datatables.  Populate each one at a time, connecting and disconnecting.  Do your logic within the app and then connect to the database that you want to update.