Microsoft.ACE.OLEDB.12.0 all times crashes in multithread scenario.

I have latest Office 2016 version 16.0.4366.1000 and I use Access OLEDB engine for work with mdb files.
If Access OLEDB is used in single thread all works ok, but two or more threads with separate ADO DB Connection instants with "Provider=Microsoft.ACE.OLEDB.12.0" all time crashing.

I wrote small C++ sample for reproduce this error. Please look at Stackoverflow for code sample.

Exception stack:

  • Exception thrown at 0x00007FFB32361F28 in ACEOLEDBTest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0000006B771FEAF0.
  • Exception thrown at 0x00007FFB32361F28 in ACEOLEDBTest.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
  • Exception thrown at 0x00007FFB32361F28 in ACEOLEDBTest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0000006B771FEAF0.
  • Exception thrown at 0x00007FFB32361F28 in ACEOLEDBTest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0000006B771FEFB8.
  • Exception thrown at 0x00007FFAF9ED1271 (Mso40UIwin32client.dll) in ACEOLEDBTest.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

Does anybody have the solution ?

We too have encountered this issue in a multi-threaded VB.Net (Framework v4.5.2) service application. After much testing, the only way we found to resolve this was to either use a single thread or turn off connection pooling (using OLE DB Services=-2). In the end we have gone with the latter as we needed the system to be able to process requests in parallel.

FYI, the version of Office 2016 I have installed does not include this driver (hence why our program passed any kind of basic testing) but it was included with the version of Office 2016 that our customer installed. So far I have checked "Microsoft Office Professional Plus 2016" (from both MSDN and MS Partner Network) and "Microsoft Office 365 ProPlus" and none of them appear to come with the Microsoft.ACE.OLEDB.12.0 OLEDB provider. Also, as far as I can see, the only version of the Microsoft Access Database Engine 2010 Redistributable available to download is SP2 (released 22/07/2013) so it is hard to get this tested in a development environment!

1 person found this reply helpful

·

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.

OK a few things:

First, the Jet Database Engine (the immediate predecessor to the ACE Engine) - or more precisely JET RED, as opposed to the JET BLUE engine used internally by the Windows OS for Active Directory, Registry, and other internal storage functions -  was not multithreading-safe.

Version 12 of the ACE Database engine was essentially version 1.0 of the new ACE Database engine components (a direct replacement for Jet RED), which was a *reduced functionality set* from the older JET (Red) Database engine, and version 12 was the version that shipped with Office 2007. I would HIGHLY DOUBT that adding multithreading support to ACE version 12 components and/or drivers was ANY significant consideration for Microsoft MS-Access Development team at that time.

So, this error, should not be surprising, if you understand the history of JET and ACE component versions reasonably well (not that you are likely to find much direct information on multithreading of JET or ACE as they are COM components, restricted generally to COM apartment -threading models).

BUT ALSO - If you have Office 2016 with Access 2016, you DO in fact have the 2016 ACE components installed *BUT* If the installation of office was from a Click-To-Run deployment model, then the components were installed under the App-V framework and are CONSEQUENTLY NOT VISIBLE TO THE HOST OS REGISTRY AND ALSO NOT PHYSICALLY LOCATED IN THE LOCATIONS EXPECTED FOR PREVIOUS .MSI INSTALLATIONS OF OFFICE. (This also holds true for Click-To-Run deployments for older versions of office: 2010, and 2013 and their respective ACE engine components & drivers.)

Markb_08109

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 April 9, 2021 Views 1,985 Applies to: