"Microsoft Access Database Engine" error when launching AutoCAD Electrical + Issues writing Excel files

"Microsoft Access Database Engine" error when launching AutoCAD Electrical + Issues writing Excel files

Nick_Hall
Collaborator Collaborator
6,353 Views
34 Replies
Message 1 of 35

"Microsoft Access Database Engine" error when launching AutoCAD Electrical + Issues writing Excel files

Nick_Hall
Collaborator
Collaborator

Last night my PC had some Windows & Office 365 updates and when I started AutoCAD Electrical 2022 this morning I got the following message

 

0EM3g000000g0Sd.png

Getting it working again was not a smooth process, so I'm documenting it here in case anyone else has similar issues

 

I clicked the "Troubleshoot ..." link and followed the instructions, downloading the Microsoft Access Database Engine 2016 Redistributable, and installing it. AutoCAD Electrical 2022 started up properly again

 

Everything was fine until I used an add-in that uses Excel Interop to read/write XLS files, which crashed out with the following error

 

"Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'"

 

Most suggestions from these forums & Google involve repairing Office, and reinstalling the Access Database Engine 2016, which would get me back to the same point, but would not fix the Excel issue

 

Using a standalone program to test Excel Interop, I found that uninstalling the Access Database Engine & repairing Office 365 would fix Excel Interop, & that it was the Access Database Engine that was breaking things

 

Further searching came up with this document from Microsoft - https://docs.microsoft.com/en-us/office/troubleshoot/access/cannot-use-odbc-or-oledb - which explains the issue, and offers two possible solutions.

These are Microsoft 365 Access Runtime, which did not work, or Microsoft Access 2013 Runtime which allowed me to use AutoCAD Electrical 2022

 

In summary, these are the steps to follow if you are having issues reading & writing Excel files in AutoCAD Electrical

 

Disclaimers

I've only tested this with AutoCAD Electrical 2022 & Excel Version 2203 Build 15028.20204

I've only tested it on my computer

I've done a quick check with AutoCAD Electrical 2021 and it seems OK

 

This has caused me a whole day's worth of pain, but hopefully it will help someone else out

6,354 Views
34 Replies
Replies (34)
Message 2 of 35

zalant
Autodesk Support
Autodesk Support

Nick, thanks so much for putting this together in such detail. You're spot-on with the link to the Microsoft write-up about this issue. The shift from the traditional way that Office has always operated is really at the heart of this issue. AutoCAD Electrical has always needed the Access Database Engine and Office updates haven't usually had this kind of severe impact on us. With the newer Office 365 click-to-run model, though, it has been a bit of a challenge, to say the least. Our Development team is well aware of this current issue, and are working on updates to correct/avoid the problem.

 

In my own testing, I've narrowed the AutoCAD Electrical startup issue and the subsequent Excel data link issue down to two specific registry keys. There may be more involved, but I did a bunch of registry digging today (using RegistryChangesView, a fantastic utility) after I had an Office 365 update that would not let me get back into Electrical. I took a snapshot of the registry before I reinstalled the 2016 Access Database Engine (which I knew would fix me and allow Electrical to launch), and then compared it to another registry snapshot after reinstalling it. What appeared to have caused the 'Install the latest 64-bit version of Microsoft Access Database Engine 2016' scenario was a change to this specific key:


HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{3BE786A0-0366-4F5C-9434-25CF162E475E}\InprocServer32\(Default)

 

After recent Office 365 updates, the path in that key’s Default value is:

 

C:\Program Files\Microsoft Office\root\VFS\ProgramFilesCommonX64\Microsoft Shared\Office16\ACEOLEDB.DLL. (File version of ACEOLEDB.DLL is 16.0.15128.20112.)

 

Changing the path in that key to the following (older version) will fix the launch issue:

 

C:\Program Files\Common Files\Microsoft Shared\OFFICE16\ACEOLEDB.DLL (File version of ACEOLEDB.DLL is 16.0.5011.1000.)

 

NOTE: This is where Microsoft's statement (in their article) about how the version numbers all starting with 16.0 can, indeed, make things a bit confusing. "2016 and M365 Apps use the same major version identifier (16.0) which may introduce unexpected behaviors."


With the launch issue fixed this way (redirecting the key value above to the older DLL file), it shouldn’t be necessary to repair or reinstall the Access Database Engine at all, which won’t subsequently break data linking with Excel, which means that it won't be necessary to then fix that registry key (documented in our article here, though, if you need it). Further Office updates will likely redirect to the newer DLL file again, but if you've got an export of that key, with it pointed to the older file, it will just be a matter of double-clicking that REG file to fix it. This issue will get fixed at some point, but having quick and easy ways to work around the issue in the meantime is the best defense.


I’ve tested this out with Electrical 2022 and 2023 and it applies to both.

NOTE: Be sure to make registry backups and exports of any specific registry keys before modifying them, just in case you need to revert back to the previous versions.

 

We look forward to getting this straightened out soon so that everyone can get back to uninterrupted workflows (well, at least not interrupted by this issue, anyway). 😉 Cheers!



Zac Travis
Message 3 of 35

Avsfan2007
Observer
Observer

Thank you for the post.  You saved me countless hours researching and testing.  Hopefully Autodesk or Microsoft fixes this issue in the future.

Message 4 of 35

rhesusminus
Mentor
Mentor
Did you create an article in AKN for this @zalant ? It would be nice to link to an official article when we reply to this question.

Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 5 of 35

jallenDBQ7U
Collaborator
Collaborator

How do you know if you have a 32-bit versus 64-bit office application on your PC?  Unfortunately the Enterprise version installed doesn't say in Control Panel.  Neither does the Help About Window.  I suppose I can know by browsing where stuff might be in installed (Program Files versus (x86), etc.  Does anyone know they have 64-bit Office applications and still got this failure?  The drivers for Office are supposedly 64-bit but default install for Office 365 apps might be 32-bit.

 

We are holding back on registry edits.  Perhaps a few individual users are doing it, but this can also create debug nightmares for an IT department when you have numerous engineers with ACADE licenses and Office 365.

0 Likes
Message 6 of 35

Nick_Hall
Collaborator
Collaborator

Hi

 

It's hidden away, but here's a step by step guide

https://support.microsoft.com/en-us/office/about-office-what-version-of-office-am-i-using-932788b8-a...

 

This is what it looks like

 

Nick_Hall_2-1651002948621.png

 

Nick

0 Likes
Message 7 of 35

zalant
Autodesk Support
Autodesk Support

@rhesusminus Indeed, I've added it to our existing article about the launch issue, which is here. I also happened to find the same information in a Microsoft article here from March 31st. Wish I'd found that first, before I spent time going through registry snapshot comparisons to arrive at the same conclusion! I guess I'll take it as validation that my methods are sound. 😉



Zac Travis
0 Likes
Message 8 of 35

jallenDBQ7U
Collaborator
Collaborator

Thanks.


It looks like I do have the 64-bit version, so that evidently makes no difference in keeping it from occurring.   We have some individuals with older setups that have the 32-bit version of Office 365

0 Likes
Message 9 of 35

jallenDBQ7U
Collaborator
Collaborator

Thanks for posting this.  I plan to forward this to our IT group.  Maybe our IT group will bless the registry change now.  It does look like it is different based on 32-bit versus 64-bit.

 

EDIT*  I am kind of glad you did the comparisons from the angle that it reminds me of a debug process for PC issues that I had forgotten about.

0 Likes
Message 10 of 35

VinodBalasubramanian
Autodesk Support
Autodesk Support

Hi All,

 

Good day. I want to provide an update on this problem. We are aware of the impact and have been working towards fixing it for all the impacted releases. An update on the fix will be available shortly. If any of the above solutions didn't help, do send me a PM. Thank you.



Vinod Balasubramanian
AutoCAD Industry Support & Escalation Lead

Message 11 of 35

VinodBalasubramanian
Autodesk Support
Autodesk Support

We have released a hotfix to address this issue. Please refer to this article. Thank you.



Vinod Balasubramanian
AutoCAD Industry Support & Escalation Lead

Message 12 of 35

rhesusminus
Mentor
Mentor

Excellent! Much needed!


Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
Message 13 of 35

steve.clarkeEBECQ
Observer
Observer

Hi @zalant any update on this ongoing issue?

 

In supporting our ACE users all I ever seem to be doing in support them is repair installs of Microsoft Access Database Engine 2016 Redistributable. 

They are getting very frustrated. 

 

Thanks

0 Likes
Message 14 of 35

rhesusminus
Mentor
Mentor

So, this link didn't work for you and your users?

https://knowledge.autodesk.com/support/autocad-electrical/troubleshooting/caas/sfdcarticles/sfdcarti...


Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 15 of 35

steve.clarkeEBECQ
Observer
Observer
Appreciate the reply.

Thank you for making me aware of this hotfix. Will give it a try.
0 Likes
Message 16 of 35

jallenDBQ7U
Collaborator
Collaborator

It should solve the problem for you.  The hotfix works perfect for us.... not one single fail since we installed it.

0 Likes
Message 17 of 35

coup2792DZ7
Contributor
Contributor

Hi,

 

When trying to add a data link we are getting the message Excel cannot be found. This is causing problems across our company. There is all sorts of stuff out there and we've tried all or most of it already with varying degrees of success.

 

I uninstalled all instances of the database engine and installed the 2013 one instead and this did seem to work, but is this the only solution we have now for this problem? 

0 Likes
Message 18 of 35

jallenDBQ7U
Collaborator
Collaborator

Did you have Access Engine Ver 2016 installed before switching to 2013?  Also which version of ACADE are you using?

 

We have 2021, 2022, and 2023 installed on various computers here for ACADE and use Microsoft 365 Office (2016 Access engine).  The hot fix solved it for us.

0 Likes
Message 19 of 35

jallenDBQ7U
Collaborator
Collaborator

After re-reading your post, it may be possible that you have a different issue.  Do you have a screen capture or exact words for the full error you got?  There are a few different ones that have occurred related to Excel.

0 Likes
Message 20 of 35

coup2792DZ7
Contributor
Contributor

Yes I had the 2016 engine when the launch issue and data link issue happened. I then uninstalled 2016, repaired Office and installed the 2013 engine and data links worked after that. I was then advised by someone in the company to go back to the 2016 engine as the latest update from Autodesk had fixed things but now the problem is back. Electrical 2021.

 

Excel Error.png

 

 

0 Likes