Unexpected(?) dependency on Microsoft Database Engine Runtime 2010

134 Views Asked by At

I am using EntityFrameworkCore with the Jet-Provider to connect to an mdb-file. I am using the OleDB drivers with following connection string

Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin; Data Source={0};Mode=Share Deny None;Jet OLEDB:Database Password={1};

Everything works as I expected it, but we discovered that we get an exception when we try to run the application without an installation of MS Access or the Access Database Engine 2010 runtime. However in our previous application we did not have this dependency. There we used the ADO-Components and it worked seemingly 'out of the box'.

The exception:

Cannot create database "C:\Users<username>\AppData\Roaming\xxxx\db.mdb" using DAO. ---> System.Runtime.InteropServices.COMException: Die COM-Klassenfactory für die Komponente mit CLSID {CD7791B9-43FD-42C5-AE42-8DD2811F0419} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 80040154 Klasse nicht registriert (Ausnahme von HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Is there a way to achieve this with the ef core provider? If not, why?

0

There are 0 best solutions below