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 0 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

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,772 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,279 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 71,101 Reputation points
    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.

    0 comments No comments

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.