Exe Crash At ADODB.Connection with “Class does not

2019-01-24 11:22发布

One machine having MSVBVM60.dll ver 6.0.97.82, say OLD. Other machine having MSVBVM60.dll ver 6.0.98.15, say NEW. Exe created from NEW machine crashes at line new ADODB.Connection on OLD machine giving following error

Run-time error '430': Class does not support Automation or does not support expected interface

How to get rid of this? My prime objective is to run the exe on OLD machine while created on NEW machine. To avoid disturbing config of NEW machine, I tried to unregister older version and register newer version on the OLD machine but no success. Is there any other dll(s) used by ADODB.Connection or i need to do something totally different to get rid of this?

标签: com vb6 ado
4条回答
Bombasti
2楼-- · 2019-01-24 11:48

The accepted answer didn't work for me. The following steps did.

  1. Tools -> References
  2. Uncheck:
    • Microsoft ActiveX Data Objects 6.1 Library
    • Microsoft ActiveX Data Recordset 6.0 Library
    • Microsoft ADO Ext. 6.0 for DDL and Security
  3. Check:
    • Microsoft ActiveX Data Objects 2.8 Library
    • Microsoft ActiveX Data Recordset 2.8 Library
    • Microsoft ADO Ext. 2.8 for DDL and Security
查看更多
贼婆χ
3楼-- · 2019-01-24 11:56

This is nothing to do with the VB runtime versions and more to do with the ADO libraries (as the error line alludes to) and was caused by Microsoft breaking compatability in their ADO libraries.

KB article 2517589 explains why and the solution which is essentially to recompile against the compatability typelib.

查看更多
唯我独甜
4楼-- · 2019-01-24 11:59

It may be easiest to patch the whole VB6 runtime on the OLD machine - you can get a download from here.

The VB6 runtime distributes as a package so I wouldn't recommend just inserting certain dlls on their own.

I'd also recommend checking that the two machines that you're running are using the same version of MDAC, in particular that the OLD machine has the version installed that is referenced in your project.

查看更多
爷、活的狠高调
5楼-- · 2019-01-24 12:14

“Class does not support Automation”. This error gets generated when compiled in vb 6.0 using 64bit version of windows and attempt to run it on a 32bit version of windows. A recompile with 32bit fixed the error

查看更多
登录 后发表回答