问题为:
win7编译的程序,在XP系统下无法使用,提示信息为: class does not support automation or does not support expected interface
解决方法:
1.下载 msado60_Backcompat_i386.tlb 文件放在本机上,如c:\temp;
2.用regtlibv12.exe(只有安装了.net framework4.0的机器才有)注册 msado60_Backcompat_i386.tlb ,如图
3.在项目菜单上单据 Project-Reference
3.1取消Microsoft ActiveX Data Objects 6.0 Library的引用;
3.2添加Microsoft ActiveX Data Objects 6.0 BackCompat Library的引用;
4.重新编译即可