我需要做个被Web调用的视屏控件ocx,Ocx中做个漂亮的登入界面和视屏功能,
但我在编译时出错:
   _ConnectionPtr m_pConnection;identifier 'm_pConnection
   _RecordsetPtr m_pRecordset;identifier 'm_pRecordset
   _bstr_t;identifier _bstr_t
都告诉我没有定义身份。????我是这样操作:
 打开VC++6.0,选择New Projects中的MFC Activex ControlWiard,输入工程名,然后完成,在stdafx.h加入#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF"),不知道为什么会出现以上错误,望高手请教

解决方案 »

  1.   

    如果你是在mfc下编程的话,请加上#include <afxdb.h>
      

  2.   

    #include <afxdb.h>
    这个已经有了,就是编译时不认
    屏蔽#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF"),
    出现以下错误:
    '_ConnectionPtr' : missing storage-class or type specifiers
    'm_pConnection' : missing storage-class or type specifiers打开#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF"),
    出现以下错误:
    error C2011: 'LockTypeEnum' : 'enum' type redefinition
    error C2011: 'DataTypeEnum' : 'enum' type redefinition
    error C2011: 'FieldAttributeEnum' : 'enum' type redefinition
    error C2011: 'EditModeEnum' : 'enum' type redefinition
    error C2011: 'RecordStatusEnum' : 'enum' type redefinition
    error C2011: 'ParameterDirectionEnum' : 'enum' type redefinition不知道为什么,望高手帮忙!