我用DAO做Access2000的程序,加入
AFX_MANAGE_STATE(AfxGetModuleState());
AfxGetModuleState()->m_dwVersion = 0x0601;
两条语句来支持Access2000的。但是编译时一直出错,请教是怎么回事。F:\GEPT数据库录入\data\dataView.cpp(67) : error C2039: 'm_dwVersion' : is not a member of 'AFX_MODULE_STATE'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxstat_.h(191) : see declaration of 'AFX_MODULE_STATE'
Error executing cl.exe.

解决方案 »

  1.   

    PRB: Unrecognized Database Format Error with Access 2000 Database 
    ID: Q236991
      

  2.   

    To read Access 2000mdb, i added the following code : 
    AfxGetModuleState()->m_dwVersion = 0x0601; 
    and then i could read Access 2000 mdb, 
    Your project config must be set to shared dll 
    Insert into the initinstance of your myprojapp.h file as 
    shown below #ifdef _AFXDLL 
    Enable3dControls(); // Call this when using MFC in a shared DLL 
    AfxGetModuleState()->m_dwVersion = 0x0601; 
    #else 
    Enable3dControlsStatic(); // Call this when linking to MFC statically' 
    #endif 
      

  3.   

    加上这个就可以了
    #include <afxdao.h>