ACEOLEDB.DLL from Microsoft 365 Apps crash with Exception code 0xc0000005

Jmenninkainen 31 Reputation points
2021-12-29T20:18:30.603+00:00

ACEOLEDB.DLL from Microsoft 365 Apps (at least versions 16.0.14228.20248, 16.0.14430.20006, 16.0.14701.20040 in "C:\Program Files\Microsoft Office\root\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\") appear to cause an application crash which 'Event Viewer' reports as in attached screenshots, Exception code 0xc0000005. This happens about 15 minutes after application is started, even when application right then is idling and not making any database connection.

When using ACEOLEDB.DLL (versions 16.0.5011.1000, 16.0.5044.1000 or 16.0.5164.1000) installed from "Microsoft Access Database Engine 2016 Redistributable" (https://www.microsoft.com/en-us/download/details.aspx?id=54920) to the folder "C:\Program Files\Common Files\microsoft shared\OFFICE16" this trouble doesn't appear.

Practical trouble is that each time Microsoft 365 Apps updates itself, it will activate its own failing version of ACEOLEDB.DLL. This happens rather frequently which make it difficult to handle: https://video2.skills-academy.com/en-us/officeupdates/update-history-microsoft365-apps-by-date

161265-image.png

The sample application with source code is at: https://1drv.ms/u/s!Ar61IfhIp1W6hNsNAREEGLEGIGGEdQ?e=QaJg6h

The executable "AceOleDbSample.exe" is in the folder "\x64\Release". It opens 'sample.mdb' when its starts and closes it right away. After that about in 12 minutes it crashes.

The only dependency should be "Microsoft Visual 2019 C++ Redistributable" (https://aka.ms/vs/17/release/vc_redist.x64.exe) and naturally either "Microsoft Access Database Engine 2016 Redistributable" (https://www.microsoft.com/en-us/download/details.aspx?id=54920) or Microsoft 365 Apps.

Code snipped causing the failure highlighted in yellow:
161244-image.png

The sample application running, after 'Restart manager' has re-started it after the crash:
161207-image.png

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,612 questions
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
849 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jmenninkainen 31 Reputation points
    2024-02-06T06:21:43.2566667+00:00

    Hi Bart, Yes, I think this trouble is still there in Access 2016 Database engine of Microsoft 365 (Office), also in today's 16.0.17231.20036 version. Microsoft 365 keeps on updating itself regularly and overwrites the failing version on customer PC's. Just two weeks ago had the last case. Workaround we have been using for 2 years is to open one database connection when program starts, and keep it alive. Close it only until the program ends. Code snippet here below: User's image

    1 person found this answer helpful.

  2. Bart Geuens 0 Reputation points
    2024-02-05T16:02:24.6233333+00:00

    I see that this is already an older ticket, but I am also bumping into a completely similar problem over the last few months, both on my development device and on all client devices. I have created a vb application based on an access database. This of course requires the accessdbengine. What I was able to figure out in the last months is the following: when the accessdbengine is not yet installed, i.e. only office365, the below registry entries have the value “C:\Program Files\Microsoft Office\root\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\ACEOLEDB.DLL” with version 16.0.17231.20036 but then the application crashes on the connectionstring or sql strings. User's image

    -          [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{3BE786A0-0366-4F5C-9434-25CF162E475E}\InprocServer32] -          [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{3BE786A0-0366-4F5C-9434-25CF162E475F}\InprocServer32] -          [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{3BE786A2-0366-4F5C-9434-25CF162E475E}\InprocServer32] -          [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{3BE786A2-0366-4F5C-9434-25CF162E475F}\InprocServer32] After installing AccessDBengine, the above registry entries change to "C:\Program Files\Common Files\Microsoft Shared\OFFICE16\ACEOLEDB.DLL" with as version16.0.5320.1000 and with these registry entries the application does work. User's image But always after several days this registry entry keeps getting reset. Can this be disabled? Did I do something wrong when designing the application? Is this some kind of bug

    0 comments No comments