Getting VB6 ADO application to work in Windows 7

Loki70 picture Loki70 · Aug 11, 2011 · Viewed 26.3k times · Source

I have inheritted several old VB6 applications that currently cannot be rewritten in .NET. These old applications all use ADO, and compile fine on my XP machine. Since switching to a Windows 7 machine, the applications compile fine, but when they are deployed (on XP machines), I get errors. This is a known issue that this Microsoft article discusses:

http://support.microsoft.com/kb/2517589

The article give a very detailed explanation of a workaround, which involved copying a ".TLB" file and registering it using "regtlibv12". When I attempt to register it, I get this error message:

RegisterTypeLib of C:\Program Files\Common Files\System\ado\msado60_Backcompat.tlb failed : 80029c4a

I have also tried registering this using the old "regtlib.exe" in the Windows folder, but got this error:

LoadTypeLib of C:\Program Files\Common Files\System\ado\msado60_Backcompat.tlb failed : 80029c4a

Because of this, I cannot continue with the work around. I would greatly appreciate any guidance anyone could give me on how to properly register this file.

Thank you in advance!

Answer

Bob77 picture Bob77 · Aug 12, 2011

Put the .TLB file in an appropriate place like

C:\Program Files\Common Files\System\ado

Then open a new Project in the VB6 IDE (elevated, i.e. as admin). Choose Project|References... then click the Browse button. Navigate to the new .TLB file and open it. Check the box to select the item and close the References dialog.

It should be registered now.

If desperate, try VB Type Library Registration Utility.