在Windows 2012 Core计算机上连接到Access 2016 [英] Connect to Access 2016 on Windows 2012 Core machines
问题描述
我在Windows 2012 Core机器上安装了Access 2016 32位。
I have Access 2016 32-bit on a Windows 2012 Core machine.
我正在尝试使用ADODB对象使用c ++ / c#代码读取.mdb文件。但是,我无法实现成功连接。这个我简单的连接使用 ADODB对象。
I am trying to read a .mdb file using c++/c# code using a ADODB object.However , I am unable to achieve a successful connection. This i simple connect using ADODB object.
我们还需要连接字符串中的其他内容吗?我们还需要Access 2016特有的其他功能吗?
Do we need anything else in the connection string ? Do we need anything else specific to Access 2016 ?
对此有任何帮助。
抛出异常中的消息为空白。
The message in the exception thrown is blank.
ADODB.Connection conn;
string str =" Provider = Microsoft.ACE.OLEDB.16.0; Data Source = C:\\ABC.mdb"; $
  ;     Console.WriteLine("尝试建立连接");
conn = new ADODB.Connection();
试试
{
conn.Open(str);
}
catch(例外e)
{
Console.WriteLine(" Exception is:",e.Message);
;   Console.WriteLine(e.StackTrace);
$
}
}
}
ADODB.Connection conn;
string str = "Provider=Microsoft.ACE.OLEDB.16.0;Data Source=C:\\ABC.mdb";
Console.WriteLine("trying to make the connection");
conn = new ADODB.Connection();
try
{
conn.Open(str);
}
catch (Exception e)
{
Console.WriteLine("Exception is : ", e.Message);
Console.WriteLine(e.StackTrace);
}
}
}
Manasa Purkar
Manasa Purkar
推荐答案
嗨Manasa Purkar,
Hi Manasa Purkar,
确保同步版本的Sync&保存和访问匹配。如果您安装了32位版本的Office,即使您有64位版本的Windows,也必须使用32位版本的Sync&保存。
尝试下载并安装:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=23734 。
无论你在尝试什么文件要访问/导入,请确保将其选为Office 2007文件(即使它可能是Office 2016文件)。
Make sure the bit version of Sync & Save and Access match. If you have a 32 bit version of Office installed, even if you have a 64 bit version of Windows, you must use the 32 bit version of Sync & Save.
Try to download and install this:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=23734.
Whatever file you are trying to access/import, make sure you select it as a Office 2007 file (even though it might be a Office 2016 file).
You can reference to this forums: https://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-quotthe-microsoftaceoledb120-provider-is-not-registered-on-the-local?forum=vstsdb
祝你好运,
Best regards,
Drake
Drake
这篇关于在Windows 2012 Core计算机上连接到Access 2016的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!