merging databases

I have two identical database - db1 and db2. I want to merge the data form db2 into db1. Using VB6 with ado. I can set and open connections to both databases and open recordsets if needed.

I want to try something like
INSERT INTO db1.table1
SELECT table1.*
FROM db2

Suggestions appreciated.

Comments

  • : I have two identical database - db1 and db2. I want to merge the data form db2 into db1. Using VB6 with ado. I can set and open connections to both databases and open recordsets if needed.
    :
    : I want to try something like
    : INSERT INTO db1.table1
    : SELECT table1.*
    : FROM db2

    I know of no such syntax. When you write an SQL statement, you are giving the database instructions. db1 doesn't know anything about db2, let alone the connection objects in your VB code. The easiest option is to tell db2 to spit out all of the records you want to a text file, then have db1 load them all. That depends on your database, however. If that doesn't work, you can always get the recordset from one and iterate through it to insert records one by one into the other.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion