Search code examples
c#dockerms-accessoledb

Docker for Windows & MS-Access database & Jet.OLEDB.4.0


I need to setup a docker container in which a legacy application needs to connect to an MS-Access 2003 DB. The connectionstring to the DB is embedded in the application itself and therefore cannot be changed. So I cannot change the provider to be ACE.OleDb either.

I have created docker images based on …

  • microsoft/dotnet-framework
  • microsoft/windowsservercore
  • microsoft/mssql-server-windows-express

… but I always get the same result when running the legacy application on the container.

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

I also tried to register the msjetoledb40.dll in SysWow64 with the following command in the container ...

C:\Windows\SysWow64\regsvr32 Msjetoledb40.dll

... but does not seem to work either.

I have also installed the Microsoft Access Database Engine Redistributable (2007, 2010 & 2016) in 32 and 64 bit (AccessDatabaseEngine.exe & AccessDatabaseEngine_X64.exe) but always get the same error as mentioned above.

2007 Office System Driver: Data Connectivity Components

Microsoft Access Database Engine 2010 Redistributable

Microsoft Access Database Engine 2016 Redistributable

Any ideas?


Solution

  • SOLVED:

    I found a 'Jet 4.0 Service Pack 8 (SP8) for Windows 95/98/NT 4.0 (KB829558)' package.

    Copied the Jet40SP8_9xNT.exe to the container and added this statement to the dockerfile

    RUN Jet40SP8_9xNT.exe /Q