在用ADO连接数据库时,需要在stdafx.h中#include哪些文件?
我的书是老版的
写上//#include <adoid.h> // 类和接口标识
//#include <adoint.h> // ADO接口
//#include "icrsint.h" // ADO2.0数据绑定扩展之后会报错,貌似adoid.lib在VC++6.0之后就没有支持了...

解决方案 »

  1.   

    #import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
    no_namespace rename("EOF", "EndOfFile")这句加了吗?
      

  2.   

    http://www.vckbase.com/document/viewdoc/?id=431http://www.vckbase.com/document/viewdoc/?id=1215
      

  3.   

    你要看看你的目录下是否有msado15.dll这个文件,如果有的话可以拷贝到工程文件下,然后直接#import "msado.dll"就行了!
    加上#include "comdef.h"了吗?AfxOleInit();这句代码是初始化COM的!
      

  4.   

    嗯,谢谢楼上...把#include "comdef.h"加入stdafx.h文件之后果然前面的问题解决啦
    但是新的问题又出现咯...麻烦帮忙看看...1>c:\users\slizn\documents\41f00ls\operations\operations\debug\msado15.tlh(2375) : error C2059: 语法错误 : “<L_TYPE_raw>”
    1>c:\users\slizn\documents\41f00ls\operations\operations\debug\msado15.tlh(2375) : error C2238: 意外的标记位于“;”之前
      

  5.   

    为什么csdn不能编辑自己的帖子?这是什么道理...晕...