How to fix the error "InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'DAO.DBEngine'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00000021-0000-0010

Devi E 5 Reputation points
2025-01-30T12:22:58.2266667+00:00

Hi, I am trying to access DAO.DBEngine for an operation and getting the error " InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'DAO.DBEngine'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00000021-0000-0010-8000-00AA006D2EA4}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))."

This was working fine, but recently we started receiving this error, can someone provide a suggestion to resolve this error

Developer technologies ASP.NET ASP.NET Core
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2025-01-30T16:38:24.64+00:00

    The registry setting appears to not be correct. Install or repair access drivers install on the hosting server.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.