如果未安装访问,我的程序仍然运行 [英] if access is not installed will my program still operate

查看:244
本文介绍了如果未安装访问,我的程序仍然运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个程序,从Excel文件中检索信息,并将该信息转换为存储在Access数据库中,并在以后使用。
程序将运行的计算机上安装了Excel,但我不确定它是否具有Access。
我只是想知道我的程序在这种情况下工作,或者Access应该安装在另一台计算机上?

解决方案

答案是:这取决于。




  • 如果您要定位 mdb 访问文件, Jet数据库引擎预先安装Windows,因此您不需要要安装任何东西(确保它已编译为 x86 ,而不是 AnyCPU 或它可能无法在64位系统上运行)。


  • 如果您使用Access 2007/2010/2013较新的 accdb 格式,目标机器必须安装了 Access数据库引擎(如 KekySemau 回答)。

    请小心,但您只能安装eit她的32位版本或64位版本,您自己的程序位置必须与驱动程序的位置匹配。

    另外,如果用户安装了另一个版本的MS Office(32位或64位) ,您将无法安装引擎(尽管如果Office 2007或更高版本已经安装了它)。




简短的答案:如果你坚持使用 mdb ,你不需要再安装任何东西。
无论如何,请确保您明确地为 x86 架构编译C#应用程序。


I am developing a program that retrieves information from Excel files and converts that information to store it in an Access Database and use it later. The computer that the program will operate on does have Excel installed, but i am not sure whether it has Access. I was just wondering will my program work in this case or Access should definitely be installed on the other computer?

解决方案

The answer is : it depends.

  • If you are targeting mdb Access files, the Jet database engine comes pre-installed with Windows, so you do not need to install anything (make sure it's compiled for x86 though, not AnyCPU or it may not work on 64bit systems).

  • If you are using the Access 2007/2010/2013 newer accdb format, the target machine must have the Access Database Engine installed (as KekySemau answered).
    Be careful though: you can only install either the 32bit or 64bit version, and your own program bitness must match that of the driver.
    Also, if the user has another version of MS Office installed (32bit or 64bit), you won't be able to install the engine (although it should already be installed if they have Office 2007 or a later version).

Short answer: if you stick with mdb, you don't need to install anything additional. In any case, make sure you compile your C# app for the x86 architecture explicitly.

这篇关于如果未安装访问,我的程序仍然运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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