错误:“找不到可安装的 ISAM" [英] Error: "Could Not Find Installable ISAM"

查看:33
本文介绍了错误:“找不到可安装的 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:ptdbProgram Tracking Database.mdb;

谢谢

推荐答案

Extended Properties 周围放置单引号:

Place single quotes around the Extended Properties:

OleDbConnection oconn = 
    new OleDbConnection(
        @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1;';");

试试吧,真的很管用.

这篇关于错误:“找不到可安装的 ISAM"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆