Windows 10 - The operating system is not currently configured to run this application

I'm running a clean Windows 10 Pro 21H2 install build 19044.2006 with Microsoft 365 Apps for business version  (Version 2209 Build 16.0.15629.20156) 64-bit.

I've created a 64 bit .net 6 app that uses the Interop.Microsoft.Office.Interop.Access.Dao (ACEDAO.DLL) from C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16

The application throws "The operating system is not currently configured to run this application" on the DBEngine dbEngine = new DBEngine(); call:

What is causing this to fail?

Can somebody give me some insights?

Answer
Answer

Hi George Jiang,

While reporting this issue in the Microsoft Admin Center Support i came across this message: Using DAO (Data Access Objects) API fails from external applications

This is a known issue and is plannend to be resolved around October 11, 2022.

There is also a workaround for this issue described in the link above. Create an ADODB (or OleDb) connection first and after that you can create an DAO connection:

Dim objConnection

Set objConnection = CreateObject("ADODB.Connection")

objConnection.open "Provider=Microsoft.Ace.OLEDB.16.0;Data Source=c:\temp\Database1.accdb" ' ensure Data Source points to a database that exists

objConnection.close

Dim DBEngine

Set DBEngine = CreateObject("DAO.DBEngine.120")

I can successfully use this workaround in my 64 bit c# net 6 project by creating a OleDb connection first and an DAO connection afterward:

using OleDbConnection oleDbConnection = new("Provider=Microsoft.Ace.OLEDB.16.0;Data Source=c:\\temp\\Database1.accdb");

await oleDbConnection.OpenAsync();

await oleDbConnection.CloseAsync();

DBEngine dbEngine = new DBEngine();

Database database = dbEngine.OpenDatabase("c:\\temp\\Database1.accdb");

While this is annoying there is a workaround and there is a resolution date.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated January 2, 2023 Views 298 Applies to: