Article ID: 255986 - Last Review: May 17, 2007 - Revision: 3.3

PRB: Improper Installation of MDAC May Return Error Message "Method '~' of Object '~' Failed" at Run Time with ADO Application

This article was previously published under Q255986
Expand all | Collapse all

SYMPTOMS

When you attempt to run simple ActiveX Data Objects (ADO) code in an application, the following error can occur:
"Method '~' of Object '~' Failed"

CAUSE

The most common cause for this error is mismatched DLL files with Microsoft Data Access Components (MDAC).

RESOLUTION

To work around this problem:
  • Make sure to install the appropriate Mdac_type.exe file that matches the same version you developed with your application. You can find the file at:
    http://msdn2.microsoft.com/en-us/data/aa937695.aspx (http://msdn2.microsoft.com/en-us/data/aa937695.aspx)
  • If you are using a Microsoft Windows 9x computer, install the latest DCOM version from:
    http://www.microsoft.com/com/resources/downloads.asp (http://www.microsoft.com/com/resources/downloads.asp)
  • If you are deploying this application, be sure to use the Package and Deployment Wizard and distribute the correct Mdac_typ.exe file version. Also make sure that the computer is restarted after MDAC installation unless you are explicitly implementing a silent install.

  • If you are still having problems, obtain the Component Checker to remove MDAC and install it again. The Component Checker can be obtained at:
    http://msdn2.microsoft.com/en-us/data/aa937695.aspx (http://msdn2.microsoft.com/en-us/data/aa937695.aspx)

MORE INFORMATION

Although this error has not been consistently reproduced, the items in the "Resolution" section appear to be effective in correcting the problem.

The preceding error is only one of the ways that mismatched DLLs may manifest themselves. A different error may occur. The component checker mentioned in the Resolution section will help determine if there are mismatched DLLs.

REFERENCES

For additional information regarding MDAC installation, click the article numbers below to view the articles in the Microsoft Knowledge Base:
232060  (http://support.microsoft.com/kb/232060/EN-US/ ) HOWTO: MDAC Setup Troubleshooting Guide
217754  (http://support.microsoft.com/kb/217754/EN-US/ ) HOWTO: Control Which MDAC Version the Package and Deployment Wizard (PDW) Distributes

APPLIES TO
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.1 Service Pack 2
  • Microsoft Data Access Components 2.1 Service Pack 1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.7
  • Microsoft Data Access Components 2.8
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
Keywords: 
kbprb KB255986
 

Article Translations