views:

267

answers:

2

I have two access databases and would like to find a way to copy tables from one database to the other. The copied table has to keep the same strucure and data.

I already tried to fiddle around with sqlBulkcopy but all information i can found about it is using sqlBulkCopy to tranfer tables to sql server.

Can I use sqlBulkCopy to copy tables between mdb files or is there another way to do this ?

A: 

Data transformation services?

UpTheCreek
+3  A: 

Try this:

insert into [AccessTable] 
    select * from [MS Access;DATABASE=D:\My Documents\db2.mdb].[AccessTable2]
Anton Gogolev
Got it working, thanks. Only one problem, this does not copy the keys and indexes.
Mez