首页 > 其他 > 详细

OPENROWSET read excel

时间:2017-05-24 17:32:03      阅读:295      评论:0      收藏:0      [点我收藏+]

由于64位系统已经不支持 oledb 4.0访问 xls

1. 未在本地计算机上注册“microsoft.ACE.oledb.12.0”提供程序

http://download.microsoft.com/download/7/0/3/703ffbcb-dc0c-4e19-b0da-1463960fdcdb/AccessDatabaseEngine.exe下载。

 

2.SQL Server blocked access to STATEMENT ‘OpenRowset/OpenDatasource‘ of component ‘Ad Hoc Distributed Queries‘ because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Ad Hoc Distributed Queries‘ by using sp_configure. For more information about enabling ‘Ad Hoc Distributed Queries‘, see "Surface Area Configuration" in SQL Server Books Online.

--打开 hoc distributed

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

 

--关闭 ad hc distributed

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

OPENROWSET read excel

原文:http://www.cnblogs.com/starluck/p/6900035.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!