最终用户计算机上C#数据库访问是否需要Microsoft Access? [英] Microsoft Access required for C# database access on end-user machines?

查看:108
本文介绍了最终用户计算机上C#数据库访问是否需要Microsoft Access?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许是愚蠢的问题.

我已经在计算机上开发了一个应用程序,该应用程序使用Microsoft Access数据库(.mdb)访问某些信息,并使用OLEDb使用监视数据填充表.

I've developed an app on my machine that uses a Microsoft Access database (.mdb) to access certain information and populate a table with monitoring data using OLEDb.

该应用程序在我的计算机上可以正常运行,但是当我将发行版放到测试计算机上(没有MS Access)时,它崩溃了.有趣的是,如果我要使用刚重命名的数据库文件名在测试机上启动该应用程序,则尽管没有数据,它的加载也应该像它应该的那样.

The application works fine on my machine, but when I put the release on test machines (without MS Access), it crashes. Interestingly, if I were to launch the application on the testing machine with the database filename just renamed, it loads like it should albeit without the data.

我似乎抛出了UnauthorizedAccessException异常,这进一步使我感到困惑.

I seem to get an UnauthorizedAccessException exception thrown which further clouds my confusion.

开发机器和我正在对其进行测试的机器都安装了.NET 3.5.

Both the development machine and the machine I'm testing it on have .NET 3.5 installed.

我希望回答"No"(否),但是到底是什么-测试机需要安装MS Access吗?

I would expect a barage of 'No's in reply to my question, but what the heck - does the testing machine need to have MS Access installed?

致谢

推荐答案

尝试下载Office连接组件

Try downloading the Office Connectivity Components here. This will let you read and create Access databases without having Access installed.

这篇关于最终用户计算机上C#数据库访问是否需要Microsoft Access?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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