Board index » delphi » Copy data from table to another one?

Copy data from table to another one?

I use Delphi 5 and Access 2000 as my database.  The ADO components are used.
I want to copy data from table A in xxx.mdb to table B in yyy.mdb which have
the same data structure but with different connection.  I want to use a
ADOCommand to do this task.  But, I don't know how to write the SQL
statement due to the tables with different connection.  Please help me.
 

Re:Copy data from table to another one?


Quote
>I use Delphi 5 and Access 2000 as my database.  The ADO components are used.
>I want to copy data from table A in xxx.mdb to table B in yyy.mdb which have
>the same data structure but with different connection.  I want to use a
>ADOCommand to do this task.  But, I don't know how to write the SQL
>statement due to the tables with different connection.  

You just use one connection and specify the full path to the second .mdb like
this

INSERT  INTO TableA
 (Select SomeFields From TableB IN 'C:\MyFolder\MyDatabase.MDB' )
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads