你引用的 ADO 是什么版本?
解决方案 »
- 新手请教关于VB中串口通信MSCOMM(想同时发两个命令)
- 用户自定义打印纸Printer.PaperSize=256不能使用
- ActiveX component can't creat object!
- 如何剔除一个文本文件中相同的一些内容
- ◆求一sql语句◆
- 关于DataGrid 控件的问题
- dbgrid 与datagrid的比较?
- 高手请进:自制控件问题(有难度)
- Frame的背景面能加入图片吗~~~~~~~~~~~~~~~~~~!
- 在vb里什么时候用到外接程序呀?可以举个例子吗,给分的
- 未知错误号80004005已经发生,Automation错误怎么回事?急
- 水晶报表中 "仅字段定义" 添加变量很麻烦 又简便方法么?
我引用的是: Microsoft AciveX Data Objects 2.6 Library
在下面显示定位: C:\Program Files \Common Files\Sysem\ADO\msado26.tlb
去微软网站下一个 MDAC 2.6,把它替换掉,没有就加在安装报中。
打包文件里有个MDAC_TYP.EXE,在运行setup的时候,发现有一个microsoft data access components 2.0在执行安装。你的意思是把这个MDAC_TYP.EXE文件不要,然后添加MDAC 2.6到打包文件列表里,是吗?好,我试试。
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
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 LibraryIf 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]
兼容的最新版本的确是 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 的全路径,确认路径是否正确?确认该文件是否存在?
Dim MyRs As ADOB.Recordset
set MyRs=New ADOB.Recordset
编译通过,打包安装测试,还在努力中。这程序的源码是上一个程序员留下来的,也不知道他当初是怎么打包的
Set MyConn =CreateObject("ADODB.Connection")
你看下Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist 目录下的MDAC_TYP.EXE文件是什么版本的,打包文件中的mdac_typ.exe默认就来源于这个文件