Question

I'm trying to move web servers. Our app (be kind) was written back in 1998 (I think) in VB6. I've got it working on our new server (Windows Server 2008 R2 64 bit). However, when I take the source code on my machine (Windows 7 64 Bit), and transfer the exe to the server, the app blows up when it tries to connect to the database with this error: "Error 430 (Class does not support Automation or does not support expected interface)"

The project references Microsoft Activex Data Objects 2.8 Library. The line that errors is

Set conn = New adodb.Connection

So, it's not actually trying to connect to the database, but purely blowing up when trying to create the object.

Anyone have any experience with this kind of error? Or any suggestions for me? Google had several possibilities but none of them panned out. Most of them had to do with Common Controls and using "Project Compatibility" -- but my app runs with "Unattended Execution" and so I can't choose that (it's completely disabled in the project properties.)

Was it helpful?

Solution

It's a breaking change to MDAC that Microsoft introduced in SP1. Check out this MSDN Forum Thread. It has a few suggestions for work-arounds. As of yet, there is no fix from Microsoft.

I ran into this on 32-bit Windows 7 and ended up rolling back SP1.

One of the suggestions is to replace the updated (broken) mdac dll with one from an un-service packed machine:

  1. Open Regedit and locate the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{2A75196C-D9EB-4129-B803-931327F72D5C}

  2. Right click, Permissions, Advanced, Owner, Change owner to Administrators, Click OK, OK

  3. Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12 -u "%CommonProgramFiles(x86)%\system\ado\msado28.tlb"

  4. Copy msado28.tlb from Win7 RTM/Win2008R2 RTM to your local machine, note the folder for the next step.

  5. Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12 "{path}\msado28.tlb"

These steps are for 64-bit windows. Should be the same for 32-bit with adjustment for the paths.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top