制作用的MS Access连接 [英] Making a connection with MS Access
问题描述
Microsoft.ACE.OLEDB.12.0'供应商未注册在本地计算机上。
块引用>
以及
Microsoft.JET.OLEDB.4.0'提供程序未注册在本地计算机上。
对我来说这两个错误。我一直都试图创建一个访问连接。我不知道该怎么办了。
我有一个64位计算机上的32位办公室。我找到的解决办法,他们说安装Access数据库引擎,但它不会让我安装64位与32位Office。提到跳过此另有消息你可以进入命令行并做
$> AccessDatabaseEngine_X64.exe /被动
,但被动不被识别为一个命令。
我发现它说要下载Office系统的驱动程序和组件然后添加Access数据库作为源,但没有任何工作的另一个潜在的解决方案。我跑出来的想法会如果有人可以帮助将不胜感激。
链接我指的文章:
- 的Microsoft.ACE.OLEDB.12.0供应商未注册
- HTTP: //blog.codefluententities.com/2011/01/20/microsoft-access-database-engine-2010-redistributable/
解决方案如果您已经有32位,然后安装Office你几乎坚持与Access数据库引擎的32位版本(又名ACE)。正如你所发现的,还有据说办法迫使64位ACE到了上已经有32位Office组件一台机器,但我个人不会去那里。
所以,你需要配置你的C#项目为32位运行。为此,您可以通过选择
平台:86
项目的属性的Build选项卡上:
(即截图拍摄于一个32位的虚拟机,因此默认配置已经是32位的。在64位机的默认设置应为任何CPU。)
要验证环境,正在运行的进程,你可以使用
的String.Format(我正在为{0}比特,IntPtr的。大小* 8)
例如,在Windows窗体应用程序,你可以使用
MessageBox.Show(的String.Format(我正在作为{0}比特。IntPtr.Size * 8));
这应该显示
<预类=郎-none prettyprint-覆盖>我正在为32位。
Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
and
Microsoft.JET.OLEDB.4.0' provider is not registered on the local machine.
are both errors for me. I've been trying both while trying to create an Access connection. I'm not sure what to do anymore.
I have 32 bit office on a 64 bit machine. I found solutions where they said to install the Access Database Engine but it won't let me install 64 bit with 32 bit office. Another source mentioned to bypass this you can go into command line and do
$> AccessDatabaseEngine_X64.exe /passive
but passive isn't recognized as a command.I found another potential solution which said to download Office system driver and components then add the access database as a source but that didn't work either. I'm running out of ideas it would be greatly appreciated if someone could help.
Links to articles I'm referring to:
- Microsoft.ACE.OLEDB.12.0 provider is not registered
- http://blog.codefluententities.com/2011/01/20/microsoft-access-database-engine-2010-redistributable/
解决方案If you already have 32-bit Office installed then you're pretty much stuck with the 32-bit version of the Access Database Engine (a.k.a. "ACE"). As you have found, there is supposedly a way to force 64-bit ACE onto a machine that already has 32-bit Office components on it, but personally I wouldn't "go there".
So, you need to configure your C# project to run as 32-bit. You can do that by choosing
Platform: x86
on the Build tab of the project's Properties:(That screenshot was taken on a 32-bit virtual machine, so the default configuration was already 32-bit. The default setting on 64-bit machines should be "Any CPU".)
To verify the environment in which the process is running you can use
String.Format("I am running as {0}-bit.", IntPtr.Size * 8)
For example, in a Windows Forms application you could use
MessageBox.Show(String.Format("I am running as {0}-bit.", IntPtr.Size * 8));
That should display
I am running as 32-bit.
这篇关于制作用的MS Access连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!