문제

I'm trying to run an optimization script within Visual Studio using C# and the CPLEX solver.

For data, I'm using Access 2013, though I'm utilizing the old .mdb file format.

I set up the database connection using the Access JET engine, which seems to require a 32-bit build.

public static string connectionString = "provider=Microsoft.JET.OLEDB.4.0; data source = " + filePath + dbName + ".mdb";

However, the version of CPLEX that I have is 64 bits (using the ILOG.Concert and ILOG.Cplex references), and will not run in a 32-bit build, else it throws a BadImageFormatException.

BadImageFormatException

Is there anything I can do besides trying to persuade my university's SysAdmins to install MSSQL Management Studio (which would take an act of congress)?

UPDATE: I do not have admin access on any computer that has a license for CPLEX, so I can't install the 64-bit drivers that Microsoft released with Office 2010.

도움이 되었습니까?

해결책

Use this Code for above Office 2007

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + pathnam + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"

다른 팁

You can use the 64bit version of the driver. Microsoft had to make it when they created the 64bit version of Office.

According to http://blogs.msdn.com/b/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx

Office 2010 will introduce a 64 bit version of Office. With that is coming a 64 bit version of the ACE Driver/Provider which will in essence give you a 64 bit version of Jet. The downside is that it doesn’t ship with the operating system but will be a redistributable .

You can download that redistributable here http://www.microsoft.com/en-us/download/details.aspx?id=13255

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top