当前位置:数据库 > Excel >>

SQL导入EXCEL报错

select * into test from openrowset ('microsoft.jet.oledb.4.0','Excel 8.0;HDR=Yes; datebase=G:\telphone.xls',sheet1$) /*Msg 15281, Level 16, State 1, Line 1 SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'Ad Hoc Distributed Queries'。有关启用 'Ad Hoc Distributed Queries' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。 */ 再执行 exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'ad Hoc distributed Queries',1 reconfigure 重新执行 select * into test from openrowset ('microsoft.jet.oledb.4.0','Excel 8.0;HDR=Yes; datebase=G:\telphone.xls',sheet1$) /*Msg 15281, Level 16, State 1, Line 1 结果报错: Msg 7399, Level 16, State 1, Line 1 链接服务器 "(null)" 的 OLE DB 访问接口 "microsoft.jet.oledb.4.0" 报错。提供程序未给出有关错误的任何信息。 Msg 7303, Level 16, State 1, Line 1 无法初始化链接服务器 "(null)" 的 OLE DB 访问接口 "microsoft.jet.oledb.4.0" 的数据源对象。
追问:操作系统:XP SP3 英文版
SQL:2005
office:2007(但文件是保存成2003版本的)Msg 7357, Level 16, State 2, Line 1
无法处理对象 "Select * from [Sheet1$]"。链接服务器 "(null)" 的 OLE DB 访问接口 "Microsoft.Ace.OLEDB.12.0" 指示该对象没有列,或当前用户没有访问该对象的权限。
Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,