错误:“无法找到可安装的ISAM” [英] Error: "Could Not Find Installable ISAM"
问题描述
我在Excel工作簿中编写了一些VBA代码,以从桌面上同一目录中的Access数据库中检索数据。在我的机器和运行Windows XP的其他几台机器上工作正常,但是当我们在Vista机器上测试时,我们遇到以下错误:
I've written some VBA code in an Excel workbook to retrieve data from an Access database in the same directory on a desktop. It works fine on my machine and several other machines running Windows XP, but when we tested this on a Vista machine, we encountered the following error:
找不到可安装的ISAM
Could not find installable ISAM
我已经做了一大堆在线搜索,但似乎找不到具体的答案。连接字符串似乎很好,正如我所提到的,它可以在几台机器上工作。
I've done a bunch of searching online but can't seem to find a concrete answer. The connection string seems to be fine, and, as I mentioned, it works on several machines.
有没有人知道可能导致这个?我的连接字符串如下:
Does anyone have any idea what could be causing this? My connection string is as follows:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\ptdb\Program Tracking Database.mdb;
谢谢
推荐答案
在扩展属性
之间放置单引号:
OleDbConnection oconn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1;';");
尝试它真的很有效!!
Try it It Really works !!
这篇关于错误:“无法找到可安装的ISAM”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!