-- 允许配置高级选项
EXEC sp_configure 'show advanced options', 0
GO
-- 重新配置
RECONFIGURE
GO
-- 启用Ad Hoc Distributed Queries
EXEC sp_configure 'Ad Hoc Distributed Queries', 0
GO
--重新配置
RECONFIGURE
GO
select * into testa from OpenDataSource('Microsoft.ACE.OLEDB.12.0',
'Data Source=c:\BBS数据表数据.xls;User ID=Admin;Password=;Extended properties=Excel 8.0')...[bbsUser$]
EXEC sp_configure 'show advanced options', 0
GO
-- 重新配置
RECONFIGURE
GO
-- 启用Ad Hoc Distributed Queries
EXEC sp_configure 'Ad Hoc Distributed Queries', 0
GO
--重新配置
RECONFIGURE
GO
select * into testa from OpenDataSource('Microsoft.ACE.OLEDB.12.0',
'Data Source=c:\BBS数据表数据.xls;User ID=Admin;Password=;Extended properties=Excel 8.0')...[bbsUser$]