VB程序打包后安装到别人的电脑上运行出现430异常:类不支持自动化或不支持期望的接口

VB程序打包后安装到别人的电脑上运行出现430错误:类不支持自动化或不支持期望的接口
        在我的电脑上,VB开发环境下运行程序一切正常,用VB自带的安装程序做好了安装包,拿到别的机器上安装,运行时报错:
运行时错误'430': 类不支持自动化或不支持期望的接口。

    经调试发现,是运行到下面语句时出错:
Set MyConn = New ADODB.Connection

        这个MyConn在通用里是这么声明的:
    Dim MyConn As ADODB.Connection

        说明: 在几台电脑上安装,都是如此。我没有在我自己的电脑上安装,因为怕把运行环境破坏掉,但在VB开发环境里是可以的,在工程目录里运行生成好的exe,也正常,一到别的电脑上安装运行就不可以。被这问题困扰了好久,VB程序打包后安装到别人的电脑上运行出现430异常:类不支持自动化或不支持期望的接口,请VB高手救我,一万个感谢!
 



------解决方案--------------------
打包文件中有没有 MDAC_TYP.EXE?
去微软网站下一个 MDAC 2.6,把它替换掉,没有就加在安装报中。
------解决方案--------------------
在64位Windows下:
64位exe和dll在目录c:\windows\system32目录下;
32位exe和dll在目录c:\windows\syswow64目录下;
所以要注意:
    在win64位系统下注册32位ocx或dll需要将32位ocx或dll拷贝到c:\windows\syswow64\目录下。
    且注册要用c:\windows\syswow64\regsvr32 xxxxxxx.ocx或dll
设置32位DSN要用c:\windows\syswow64\odbcad32.exe
设置32位alias要用c:\windows\syswow64\cliconfg.exe
------解决方案--------------------
把你的源代码在别的机器上重新编译一次,看看是否报错,如果不能通过编译,看看错在哪里..........
------解决方案--------------------
这是微软的说明:

Referencing the ADO Libraries In a Visual Basic 6 Application
To import the ADO libraries into a Microsoft Visual Basic 6 application, you must set a reference in the Visual 
Basic project.

To set a reference to the ADO libraries in a Visual Basic project
1.Create a new or open an existing Visual Basic project.

2.Click the Project menu item and then select References... from the drop-down menu panel.

3.From Available References, check the box for Microsoft ActiveX Data Objects n.n Library, where n.n 
represents the latest version number. The Location field below should identify your choice as 
$installDir\msado15.dll, where $installDir represents the path of the directory in which the ADO 
library has been installed.

4.If you intend to use ADO MD, repeat step 3 to select Microsoft ActiveX Data Objects (Multi-dimensional) 
n.n Library. The Location field should identify this choice as $installDir\msadomd.dll.

5.If you intend to use ADOX, repeat step 3 to select Microsoft ADO Ext. n.n for DDL and Security. 
The Location field should identify this choice as $installDir\msadox.dll.

6.Click OK to finish setting the references.

Backward Compatibility
--------------------------------------------------------------------------------

Installing ADO also copies the following type libraries of earlier versions:

•msado27.tlb, ADO 2.7 Type Library

•msado26.tlb, ADO 2.6 Type Library

•msado25.tlb, ADO 2.5 Type Library

•msado21.tlb, ADO 2.1 Type Library

•msado20.tlb, ADO 2.0 Type Library

If your application must use any of these ADO libraries for reasons of backward compatibility, you need to 
import the appropriate version of the type library. To do this, follow the procedures in the previous section, 
replacing msado15.dll by msadoXX.tlb, where XX represents the version number you need to import.
[/code]
------解决方案--------------------
.tlb 只是接口定义,供开发时使用,运行时用不上。
兼容的最新版本的确是 2.8,安装时记得关闭杀毒软件。

安装完后可以通过注册表确认一下:
HKEY_CLASSES_ROOT\ADODB.Connection\CLSID\ 的默认值是 {00000514-0000-0010-8000-00AA006D2EA4};
然后定位 HKEY_CLASSES_ROOT\CLSID\{00000514-0000-0010-8000-00AA006D2EA4}\,
可以看到 ProgID\ 是 ADODB.Connection.2.8,
InprocServer32\ 下有 msado15.dll 的全路径,确认路径是否正确?确认该文件是否存在?

------解决方案--------------------
在报错的机器上单独安装MDAC2.8MDACTYP.EXE试试
------解决方案--------------------
还酸碱度护身符对哦速度法官
------解决方案--------------------
VB程序打包后安装到别人的电脑上运行出现430异常:类不支持自动化或不支持期望的接口
------解决方案--------------------