sqlserver 操作access数据库

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

--插入 insert into opendatasource('Microsoft.jet.oledb.4.0','data source=E:\temp\test.mdb;user id=admin;password=;')...[test](name) select 'mxh'

--查询 select * from opendatasource('Microsoft.jet.oledb.4.0','data source=E:\temp\test.mdb;user id=admin;password=;')...[test]

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

posted @ 2013-08-19 09:39  kuailewangzi1212  阅读(350)  评论(0编辑  收藏  举报