Copying Tables from one Database to another 
Author Message
 Copying Tables from one Database to another

Hello,

Is there a quick way with ADO to copy a table from one connection source to
another one?  Both connections are to Access Databases.

Thanks,  Michael



Sat, 18 Sep 2004 21:08:35 GMT  
 Copying Tables from one Database to another

INSERT INTO myTable
SELECT * FROM myTable IN 'c:\myother.mdb'

--
Michael Collier Bsc (Hons)

Interactive ADO Browser www.adoanywhere.com
Free ADO Browser (FAB)  www.adoanywhere.com/fab
Home Page www.adoanywhere.com

--


Quote:
> Hello,

> Is there a quick way with ADO to copy a table from one connection source
to
> another one?  Both connections are to Access Databases.

> Thanks,  Michael



Sun, 19 Sep 2004 00:04:15 GMT  
 Copying Tables from one Database to another
Hi,

If you want to do it using two connection, then thre is no
easy way to do that. But you can do it using one
connection. Here is an example

Dim loConnection As ADODB.Connection

Set loConnection = New ADODB.Connection

loConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source='C:\DestinationDatabase.mdb';"

lcSQL = "INSERT INTO tblFields SELECT * FROM "
lcSQL = lcSQL & "[C:\SourceDatabase.mdb].[tblFields]"

loConnection.Execute lcSQL, , adExecuteNoRecords

loConnection.Close
Set loConnection = Nothing

Val

Quote:
>-----Original Message-----
>Hello,

>Is there a quick way with ADO to copy a table from one

connection source to
Quote:
>another one?  Both connections are to Access Databases.

>Thanks,  Michael

>.



Sun, 19 Sep 2004 00:00:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Copying tables from one database to another

2. Two problems with copying tables from one database to another

3. copying tables from one database to anaother

4. ADO Copy Tables from One Database to Another (Access 97)

5. Copying the contents of a table in one database to another database

6. Copying the contents of a table in one database to another database

7. Newbie question: How to copy tables from one database to another?

8. To Copy table from one Access database to other

9. Copy a table from one Database (AS400 or SQL server) to another (MDB)

10. Copy entire table from one database to another

11. MS Access DB - Copy Table A from Database A to Table A Database B

12. Help Help Need to copy a field from one table into another table

 

 
Powered by phpBB® Forum Software