我的程序中要用到excel的com操作和數據庫操作﹐我用ADO連接﹐可是好象他們倆有沖突﹐怎么辦啊?
加入ado:
#import "c:\program files\common files\system\ado\msado15.dll" \
no_namespace \
rename ("EOF", "adoEOF")當我導入excel9.olb后編譯時出現了大量的錯誤﹕
--------------------Configuration: testado - Win32 Debug--------------------
Compiling...
excel9.cpp
e:\myprojects\testado\excel9.h(7494) : warning C4099: 'Parameter' : type name first seen using 'struct' now seen using 'class'
        e:\myprojects\testado\debug\msado15.tlh(95) : see declaration of 'Parameter'
e:\myprojects\testado\excel9.h(7524) : error C2011: 'Parameters' : 'struct' type redefinition
E:\MyProjects\testado\excel9.cpp(40771) : error C2039: 'GetApplication' : is not a member of 'Parameters'
        e:\myprojects\testado\debug\msado15.tlh(2023) : see declaration of 'Parameters'
E:\MyProjects\testado\excel9.cpp(40774) : error C2065: 'InvokeHelper' : undeclared identifier
E:\MyProjects\testado\excel9.cpp(40778) : error C2039: 'GetCreator' : is not a member of 'Parameters'
        e:\myprojects\testado\debug\msado15.tlh(2023) : see declaration of 'Parameters'
E:\MyProjects\testado\excel9.cpp(40785) : error C2039: 'GetParent' : is not a member of 'Parameters'
        e:\myprojects\testado\debug\msado15.tlh(2023) : see declaration of 'Parameters'
E:\MyProjects\testado\excel9.cpp(40792) : error C2039: 'Add' : is not a member of 'Parameters'
        e:\myprojects\testado\debug\msado15.tlh(2023) : see declaration of 'Parameters'
E:\MyProjects\testado\excel9.cpp(40803) : error C2509: 'GetCount' : member function not declared in 'Parameters'
        e:\myprojects\testado\debug\msado15.tlh(2023) : see declaration of 'Parameters'
E:\MyProjects\testado\excel9.cpp(40810) : error C2063: 'Item' : not a function
E:\MyProjects\testado\excel9.cpp(40810) : error C2040: 'Item' : 'struct IDispatch *(const struct tagVARIANT &)' differs in levels of indirection from 'class _com_ptr_t<class _com_IIID<struct _Parameter,&struct __s_GUID  _GUID_0000050c_0000_0010_8000
_00aa006d2ea4> >'
E:\MyProjects\testado\excel9.cpp(40810) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Error executing cl.exe.testado.exe - 10 error(s), 1 warning(s)是否要對每個有沖突的都rename?具體怎么操作﹐望大俠幫助﹐沒分了﹐表示歉意