VB6 application will not work on server 2008 after recompilation

I am trying to move web servers. Our application (be kind) was written in 1998 (I think) in VB6. It works for me 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 exe to the server, the application explodes when it tries to connect to the database with this error: "Error 430 (the class does not support Automation or does not support the expected interface)

The project refers to the Microsoft ActiveX Data Objects 2.8 Library. Line in which errors

Set conn = New adodb.Connection 

Thus, it does not actually try to connect to the database, but simply explodes when trying to create an object.

Does anyone have experience with such a mistake? Or any suggestions for me? Google had several options, but none of them came out. Most of them were related to Common Controls and using "project compatibility", but my application works with "Automatic execution", so I can not select this (it is completely disabled in the project properties.)

+4
source share
1 answer

This is an awesome change for MDAC that Microsoft introduced in Service Pack 1. See the MSDN Forum Topic . It has some work tips. Microsoft does not have any fixes at this time.

I came across this on 32-bit Windows 7 and ended up rolling SP1.

One of the suggestions is to replace the updated (broken) mdac-dll with one of the packed machines without maintenance:

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

  • Right-click, "Permissions", "Advanced", "Owner", "Change Owner" to "Administrators", "OK", "OK"

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

  • Copy msado28.tlb from RTM / Win2008R2 RTM to the local computer, pay attention to the folder for the next step.

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

These steps are for 64-bit windows. Must be the same for 32-bit with setting for paths.

+4
source

Source: https://habr.com/ru/post/1345651/


All Articles