加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 数据库 > MsSql > 正文

sql-server-2008 – 链接服务器“(null)”的OLE DB提供程序“Microsoft.ACE.OLE

发布时间:2020-05-24 20:00:07 所属栏目:MsSql 来源:互联网
导读:我想从Excel导出MSSQL SERVER 2008中的数据,但我有错误 OLE DB provider Microsoft.ACE.OLEDB.12.0 for linked server (null) returned message Bookmark is invalid..Msg 7343, Level 16, State 2, Line 1The OLE DB p

我想从Excel导出MSSQL SERVER 2008中的数据,但我有错误

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" 
returned message "Bookmark is invalid.".

Msg 7343,Level 16,State 2,Line 1

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" 
could not INSERT INTO table "[Microsoft.ACE.OLEDB.12.0]".

它是我的excel文件导出(文件保存格式97-2003)

我的查询

告诉我,为什么我会收到错误?我需要做什么?

解决方法

尝试这个
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 8.0;Database=C:Export.xls;','SELECT id_sale FROM [ExportSheet$]')
SELECT id_sale
FROM dbo.Sale

要么

INSERT INTO OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=C:Export.xls;Extended Properties=EXCEL 8.0')...[ExportSheet$]
SELECT id_sale
FROM dbo.Sale

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读