sqlserver 操作access数据库

时间:2025-02-11 17:03:38

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