开发环境为:vc6 + win2000 ,msdac 版本为2.7
文件afxfx.h部分代码如下:// NOTE: UNCOMMENT FOLLOWING LINE IF USING MDAC 2.0 (ADO 2.0) and comment above line. #import "C:\Program Files\Common Files\System\ole db\msdasc.dll" rename_namespace("dl20")编译显示:
c:\Documents and Settings\Administrator\My Documents\C++\数据库\adodatagrid\StdAfx.h(29): fatal error C1083: 无法打开类型库文件:“C:\Program Files\Common Files\System\ole db\msdasc.dll”:参数数目无效。
不知道是什么问题??
文件afxfx.h部分代码如下:// NOTE: UNCOMMENT FOLLOWING LINE IF USING MDAC 2.0 (ADO 2.0) and comment above line. #import "C:\Program Files\Common Files\System\ole db\msdasc.dll" rename_namespace("dl20")编译显示:
c:\Documents and Settings\Administrator\My Documents\C++\数据库\adodatagrid\StdAfx.h(29): fatal error C1083: 无法打开类型库文件:“C:\Program Files\Common Files\System\ole db\msdasc.dll”:参数数目无效。
不知道是什么问题??
解决方案 »
- 急急急!!!
- VS2008下不能从“const char *”转换为“LPCTSTR”,用_T()解决不了
- 使用AddIPAddress增加ip地址后,ip不能立即生效,如果立即创建socket,则会失败,请问用什么API等待?
- 请求推荐vc++入门的好书,适合初学者
- 关于远程控制,模拟鼠标操作的问题
- 关于通过socket获取http报文的问题.
- 因位图太大,CreateBitmap()无法建立的问题
- 有VC方面的MSN群吗?本人的MSN:[email protected]
- 请教一个简单的问题?
- udp通信:电脑上子有一个网卡,这样可以在一台机子上进行udp通信不?
- 20分求购Visual Assist version 4.1.3注册码
- 来者有分
-------------------------------------------------------
#pragma warning (disable: 4146)#import "x:\program files\common files\system\ado\msado15.dll" rename_namespace("ADOCG") \
rename ("EOF", "adoEOF") \
rename ("BOF", "adoBOF") \
rename ("LockTypeEnum", "adoLockTypeEnum") \
rename ("DataTypeEnum", "adoDataTypeEnum") \
rename ("FieldAttributeEnum", "adoFieldAttributeEnum") \
rename ("EditModeEnum", "adoEditModeEnum") \
rename ("RecordStatusEnum", "adoRecordStatusEnum") \
rename ("ParameterDirectionEnum", "adoParameterDirectionEnum")
using namespace ADOCG;or // use entire pathname
#import "x:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
or // have contained path
#import "msado15.dll" no_namespace rename("EOF","adoEOF") #pragma warning (default: 4146)
An attempt to #import Msdasc.dll to gain access to the DataLink COM object and OLE DB connection dialog results in the following compiler error in Visual C++:
fatal error C1083: Cannot open type library file: 'C:\Program Files\Common Files\System\OLE DB\msdasc.dll': Error loading type library/DLL.
The same #import of Msdasc.dll worked properly in ADO 2.0 but does not work in ADO version 2.1. CAUSE
The type library for the DataLink COM object is no longer in Msdasc.dll. The type library has been moved into Oledb32.dll. RESOLUTION
Change Msdasc.dll to oledb32.dll in your #import statement. STATUS
This behavior is by design. 感谢cadinfo支持,分照散!