把sql server 数据直接插入到access的语句

insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'C:\db.mdb';'admin';'', Test) select id,names,age from Test

 

 

 

 

use test

insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'C:/db.mdb', Test)
select id,names,age from Test


insert into  OPENROWSET('Microsoft.Jet.OLEDB.4.0',
   'C:\db.mdb';'admin';'', Test)
select id,names,age from Test

 

exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure

你可能感兴趣的:(SQL Server)