Short and sweet:
Code:
string conn = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;";
OleDbConnection _connOle = new OleDbConnection(conn);
Any ideas what I should do to get this app to work on the x64 machines? Thanks!
I can think of two scenarios that could explain your issue:
Your C# project is set to target both 64-bit and 32-bit platforms and the 64-bit machine has only the 32-bit version of the Access Database Engine installed. The reference fails because the program is running as 64-bit but the machine is missing
C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL
Your C# project is set to target 32-bit platforms only (x86) and the 64-bit machine has only the 64-bit version of the Access Database Engine installed. The reference fails because the program is running as 32-bit but the machine is missing
C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\ACEOLEDB.DLL
Note that the installer for the 64-bit version of the Access Database Engine installs just the 64-bit version, not both.