关于SQL操作excel需要配置外围应用配置的解决方法
2009-03-18 09:25 Country Shen 阅读(245) 评论(0) 编辑 收藏 举报当用opendatasource或openRowSet查询EXCEL时,SQL会经常提示需要配置外围应用配置的问题
一个解决方案是手动去配置SQL管理器
还有一种方式就是直接在查询分析器里执行以下SQL:
这个是开启:
1 exec sp_configure \'show advanced options\',1
2
3 reconfigure
4
5 exec sp_configure \'Ad Hoc Distributed Queries\',1
6
7 reconfigure
2
3 reconfigure
4
5 exec sp_configure \'Ad Hoc Distributed Queries\',1
6
7 reconfigure
这个是关闭
1 exec sp_configure \'Ad Hoc Distributed Queries\',0
2 reconfigure
3 exec sp_configure \'show advanced options\',0
2 reconfigure
3 exec sp_configure \'show advanced options\',0
4 reconfigure