Sage Data Objects SDOEngine.26 Run-time error '-2147221164 (80040154)' Class not registered

SOLVED

Hi All,

I've been battling with this issue over a couple of months with the assistance of the support desk but as yet to no avail, can anyone assist?

A registered sage developer has worked with us over the years and developed a few Access databases which link in to Sage data. Most of this was written for Sage 50 Accounts v23; in Q1 2021 we upgraded to the heady heights of v26.3; everything has gone smoothly.

In July I was asked to put the database onto a computer that didn't have Sage so I installed the SDO package but kept getting the error Run-time error '-2147221164 (80040154)' Class not registered when the following VBA code was called CreateObject("SDOEngine.26").
I tried a number of installs and re-installs even installing v23 and upgrading as this was the first PC to have gone straight to v26. Unfortunately nothing cleared the error.
Support sent me a list of instructions to follow - ODBC settings to wipe, Assemblies to de-register, files to delete but this didn't make any difference. I believe that a tool to wipe Sage entirely was also run to no avail. The consultant who developed the software had a good look with me but unfortunately was also at a loss.
In the end I managed to get the PC for a couple of days and completely wiped it, unfortunately the error didn't clear and almost three months later that PC still can't use our custom database fully. I didn't panic as it's a nice to have on this PC and not a huge issue that it doesn't work.

Earlier this week I had a call from a user who does need to use the database
and was getting the same error. This user was using v23 and was upgraded to v26; I've followed the same steps completely(?) removing Sage and reinstalling it but the error persists.

My testing has been wide ranging but a couple of key points:
CreateObject("SDOEngine.25")
Gives the error 429 'ActiveX Component can't create object' which I'd expect as the dll's don't exist on the PC. Even after all the full removal of Sage CreateObject("SDOEngine.26") was still giving the 'Class not registered' error which would imply that something was still in the bowels of the system when it shouldn't be.
I have tried installing the SDO Package (Sage50Accounts_SDO.msi) after Sage was installed but it made no difference.
This database is copied to a number of PCs that are all working correctly so I don't believe it to be a code fault.

The PCs are both on the same network and are Windows 10 64bit PCs, they are all running Office 365 and the custom database is Access with a SQL back end.

I'm at a loss and hope that someone can assist. Thank you,

Andrew

Top Replies

Parents
  • +1
    verified answer
    Support sent me a list of instructions to follow - ODBC settings to wipe, Assemblies to de-register, files to delete but this didn't make any difference. I believe that a tool to wipe Sage entirely was also run to no avail.

    Given the error message I wouldn't expect any of that to help as none of that is causing SDO to be registered, and in the case of ODBC settings is completely unrelated to SDO, so I'm not sure why any of that would have been suggested.

    You can confirm if the class has been registered by running a couple of simple commands from the command prompt:

    reg query HKEY_CLASSES_ROOT\SDOEngine.26
    
    reg query HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{313C6D6D-211B-426F-A3FE-9143E6A50EDC}\InProcServer32

    If they are successful then the second command will indicate a file name (C:\WINDOWS\system32\sg50SdoEngine260.DLL by default) so make sure that exists. If that is all OK then SDO is registered and the issue is something else. If either of these commands returns an error then SDO is not correctly registered. The simplest fix for that is to open a command prompt as administrator and run the following command

    regsvr32 C:\WINDOWS\system32\sg50SdoEngine260.DLL

    Having said that I suspect that SDO will be registered OK and the problem is not a registration error but a "bit-ness" issue. In Access go to Account -> About Access and this will open the about screen. At the top you should see a version number followed by "32-bit" or "64-bit"

    My guess is that you will see "64-bit" and that is the problem. SDO is a 32-bit COM server and as such can only be loaded via a 32-bit process, but your version of Access is 64-bit so cannot see a 32-bit  COM registration (this is true for all 32 bit COM servers, not just SDO - a 64-bit process simply cannot access them).

    Assuming my guess is correct then I'm afraid the only thing you can do is to uninstall the 64-bit version of Microsoft Office and install the 32-bit version instead.

    Hope that helps.

Reply
  • +1
    verified answer
    Support sent me a list of instructions to follow - ODBC settings to wipe, Assemblies to de-register, files to delete but this didn't make any difference. I believe that a tool to wipe Sage entirely was also run to no avail.

    Given the error message I wouldn't expect any of that to help as none of that is causing SDO to be registered, and in the case of ODBC settings is completely unrelated to SDO, so I'm not sure why any of that would have been suggested.

    You can confirm if the class has been registered by running a couple of simple commands from the command prompt:

    reg query HKEY_CLASSES_ROOT\SDOEngine.26
    
    reg query HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{313C6D6D-211B-426F-A3FE-9143E6A50EDC}\InProcServer32

    If they are successful then the second command will indicate a file name (C:\WINDOWS\system32\sg50SdoEngine260.DLL by default) so make sure that exists. If that is all OK then SDO is registered and the issue is something else. If either of these commands returns an error then SDO is not correctly registered. The simplest fix for that is to open a command prompt as administrator and run the following command

    regsvr32 C:\WINDOWS\system32\sg50SdoEngine260.DLL

    Having said that I suspect that SDO will be registered OK and the problem is not a registration error but a "bit-ness" issue. In Access go to Account -> About Access and this will open the about screen. At the top you should see a version number followed by "32-bit" or "64-bit"

    My guess is that you will see "64-bit" and that is the problem. SDO is a 32-bit COM server and as such can only be loaded via a 32-bit process, but your version of Access is 64-bit so cannot see a 32-bit  COM registration (this is true for all 32 bit COM servers, not just SDO - a 64-bit process simply cannot access them).

    Assuming my guess is correct then I'm afraid the only thing you can do is to uninstall the 64-bit version of Microsoft Office and install the 32-bit version instead.

    Hope that helps.

Children