tags:

views:

21

answers:

1

Hi All,

I've installed the Microsoft Access Database Engine in order for an app to read and update and Excel file using OLEDB on a 64bit operating system. It all still works fine on 32 bit however i get a "Failure Creating File" error on a 64 bit machine.

I'm using the following connectionstring(VB.Net) as per connectionstrings.com(http://www.connectionstrings.com/excel-2007):

lstrConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\excelfile.xlsx;Extended Properties=""Excel 12.0;HDR=YES"";"

Any advice would be greatly appreciated. Thanks a lot!

+1  A: 

You'll need to install the 64-bit version. Download from here.

The generic solution is to force your program to run in 32-bit mode. Project + Properties, Compile tab, scroll down, Advanced Compile Options, Target CPU = x86.

Hans Passant