2006. augusztus 21., hétfő

Copy one table from Access database in to another Access database


Problem/Question/Abstract:

How to copy one table from Access database in to another Access database

Answer:

If I am not wrong you have an Access db with multiple tables and you want to copy one of these tables into another Access db. For this case i would do the next:

Create database TrasportDB.mdb - use ADOX.
Copy table from source table into TransportDB.mdb with Select * Into [TransportTable] in "FullPath\TransportDB.mdb" From SourceTable.
Deliver TransportDB.mdb on destination computer.
Copy table from TransportTable into DestTable with Select * Into [DestTable] From [TransportTable] in "FullPath\TransportDB.mdb".

FullPath is the path to TransportDB.mdb and is different on source and dest computers.

This way you will use native access methods that should be more reliable and faster than using ADO methods. If you need to perform more complete tasks you should use replication from Microsoft Jet and Replication objects (import this typelib).

Nincsenek megjegyzések:

Megjegyzés küldése