InfiniTec - Henning Krauses Blog

Don't adjust your mind - it's reality that is malfunctioning

Repair a corrupted MDAC installation

Affected products

  • Windows XP
  • Windows 2003
  • MDAC 2.71
  • MDAC 2.8

Summary

The MDAC component is a set of components that allow uniform data access to various data sources. These components can become corrupted. This article outline a way to manually repair the MDAC components.

Symptoms

If a program that accesses databases via ADO (ActiveX Data Objects) or similar displays the error message
The specified Procedure was not found
this indicates, that the MDAC installation is damaged.
Additionally, a new installation of the MDAC components does not solve the solution.

Solution

If a reinstallation of the MDAC components does not solve the problem, try the following steps to manually repair the MDAC components:
  1. Download the MDAC setup suite in the version that is already installed on your system. It can be found on the Microsoft Download website.
  2. Open a command prompt and change to the directory where you saved the file.
  3. Type
    MDAC_TYP /c /t:<myfolder>
    where <myfolder> is a folder on your harddisk, e.g. c:\temp\mdac
  4. Change the current folder to <myfolder> and type the following:
    md temp
    expand mdacxpak.cab temp -f:*.*
  5. Cut-and-paste the following code snippet into a text editor and save it as makedirs.cmd in the <myfolder>\temp directory:
    @echo off
    md ADO
    copy /b MSADER15.DLL ADO
    copy /b MSADO15.DLL ADO
    copy /b MSADO20.TLB ADO
    copy /b MSADO21.TLB ADO
    copy /b MSADOMD.DLL ADO
    copy /b MSADOR15.DLL ADO
    copy /b MSADOX.DLL ADO
    copy /b MSADRH15.DLL ADO
    copy /b MSJRO.DLL ADO
    md MSADC
    copy /b MSADCE.DLL MSADC
    copy /b MSADCER.DLL MSADC
    copy /b MSADCF.DLL MSADC
    copy /b MSADCFR.DLL MSADC
    copy /b MSADCO.DLL MSADC
    copy /b MSADCOR.DLL MSADC
    copy /b MSADCS.DLL MSADC
    copy /b MSADDS.DLL MSADC
    copy /b MSADDSR.DLL MSADC
    copy /b MSDAPRSR.DLL MSADC
    copy /b MSDAPRST.DLL MSADC
    copy /b MSDAREM.DLL MSADC
    copy /b MSDAREMR.DLL MSADC
    copy /b MSDFMAP.DLL MSADC
    md "OLE DB"
    copy /b MSDADC.DLL "OLE DB"
    copy /b MSDAENUM.DLL "OLE DB"
    copy /b MSDAER.DLL "OLE DB"
    copy /b MSDAORA.DLL "OLE DB"
    copy /b MSDAOSP.DLL "OLE DB"
    copy /b MSDAPS.DLL "OLE DB"
    copy /b MSDASC.DLL "OLE DB"
    copy /b MSDASQL.DLL "OLE DB"
    copy /b MSDASQLR.DLL "OLE DB"
    copy /b MSDATL2.DLL "OLE DB"
    copy /b MSDATT.DLL "OLE DB"
    copy /b MSDAURL.DLL "OLE DB"
    copy /b MSXACTPS.DLL "OLE DB"
    copy /b OLEDB32.DLL "OLE DB"
    copy /b OLEDB32R.DLL "OLE DB"
    copy /b OLEDB32X.DLL "OLE DB"
    echo.
    echo Finished !!
    :eof
  6. In your command prompt window, change to the directory where you extracted the cab file.
  7. Start the above file by typing
    makedirs.cmd
  8. The above batch file has now created three directories within the current directory, , MSADC and OLE DB. These three directories must now be placed under the %CommonProgramFiles%\system directory.
  9. Now, cut-and-paste the following snippet into a text editor and save it as RegFiles.cmd in the %CommonProgramFiles%\system directory:
    @echo off
    echo Unregistering DLLs...
    for %%a in (ado\*.dll msadc\*.dll "ole db"\*.dll) do regsvr32 /u /s %%a
    echo Finished.
    echo Reregistering DLLs...
    for %%a in (ado\*.dll msadc\*.dll "ole db"\*.dll) do regsvr32 /s %%a
    echo Finished.
  10. Within your command prompt, change the current directory to %CommonProgramFiles%\system and type the following:
    RegFiles.cmd
    This will de-register the MDAC components and the re-registers them.

References

This solution was taken from the newsgroup microsoft.public.data.ado. The name of the thread was Repair a corrupted MDAC 2.71 installation - the Solution. Many thanks to the author Jens Geyer

Posted by Henning Krause on Friday, December 31, 2004 3:13 PM, last modified on Sunday, November 28, 2010 7:38 PM
Permalink | Post RSSRSS comment feed