Search code examples
excelvb.netms-accessms-officeoledb

Microsoft ACE OLE DB 12.0 is not registered on the local machine - But it is


I know this is a common error message, and the fix is usually to install this download, however, my end user has already done this.

I have 2 end users of this program, other than myself. I've got a 64-bit Windows 10 PC, and the first end user also has a 64-bit Windows 10 PC. This user had the problem of not having Ole DB 12.0 installed, so I sent them that link, and wham bam, thank you ma'am, the issue was solved.

However the second end user is running a 64-bit Windows 7 PC - I sent him exactly the same link, and he's installed it (Or so he says), yet the error is still occurring... Is it not compatible with Windows 7, despite the details under the download saying that it is?

Is there anything else that could be causing this issue?

The program is trying to import from Excel to Access, using the following connection path;

If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
    txtFile.Text = ofd.FileName

    fi = New FileInfo(ofd.FileName)
    fileName = ofd.FileName

    excel = fi.FullName

    eCon = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & excel & ";Extended Properties=Excel 10.0;")
    eCon.Open()

Solution

  • The reason for this is that your application is compiled for x86 CPUs and not x64. Consequently your app is looking for the 32 bit version of the driver and not the x64 bit one installed. When you installed the 32 bit one your application worked. I get this all the time.