Search code examples
c#excelms-accessruntimeoledb

ACE OLEDB Connection to Access Runtime 2016


I have a working code that integrates with Access runtime 2013 (32bit) (reading an Excel file).

I removed the 2013 version, and installed the Access runtime 2016 version instead.

This is the connection string I'm using (that worked with 2013):

Provider=Microsoft.ACE.OLEDB.15.0;Data Source=C:\\Users\\myuser\\Desktop//District.xls;Extended Properties=\"Excel 12.0;HDR=YES;\";

Also, using Microsoft.Office.Interop.Excel version 15.0.0.0, Runtime Version v2.0.50727

When I'm running the code I'm getting an error:

The 'Microsoft.ACE.OLEDB.15.0' provider is not registered on the local machine.

what needs to be done in order to fix this?

EDIT: I have office 2016 x64, Access 2016 Runtime x64, Access Database Engine 2016 Redistributable x64, all installed. Also, changed connection string to be Microsoft.ACE.OLEDB.16.0. Getting error message

The 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine.


Solution

  • We found out that the problem is a known issue in a multi-threaded environment, and currently there is no solution.

    https://social.technet.microsoft.com/Forums/office/en-US/be010270-bf19-4763-8c4a-a46b8866de83/microsoftaceoledb120-crashed-in-multithread-scenario?forum=Office2016ITPro

    It's probably best to just move on to a newer solution, since this is an old way of accessing Excel files.