Oledbconnection Sample String

2021-02-26  本文已影响0人  大地缸

title: "Oledbconnection Sample String"
date: 2021-02-07T20:11:23+08:00
draft: true
tags: ['csharp','sql']
author: "dadigang"
author_cn: "大地缸"
personal: "http://www.real007.cn"


关于作者

http://www.real007.cn/about

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ExcelFilePath & ";password='mlez';Extended Properties='Excel 8.0;hdr=yes;imex=1'"

提示错误:未处理的oledbException

无法启动应用程序。工作组信息文件丢失,或是已被其它用户以独占方式打开。

将password改成passwords时

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ExcelFilePath & ";passwords='mlez';Extended Properties='Excel 8.0;hdr=yes;imex=1'"

提示错误:未处理的oledbException

找不到可安装的 ISAM。

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ExcelFilePath & ";Extended Properties='Excel 8.0;hdr=yes;imex=1'"

当删除passwords='mlez';且Excel文件去密码,是可以正确连接的,是不会有任何问题的

上一篇下一篇

猜你喜欢

热点阅读