我用VC6.0做了一个访问ACCESS数据库的程序,用的是DAO,为什么在我的机子上编译运行正常,但是到别人的机子上就出错呢?
(开始用ACCESS2000生成的数据库在本机上都不行,后来将它转换成早期版本,在本机上才运行正常)
请高手指点,不然就交不了货了,惨哪!!

解决方案 »

  1.   

    没有在它的机器上配置数据源吧?配置一下试试看。
    另外,不要用Access2000,好像不支持。
      

  2.   

    //Access2000 database and DAO
    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 
    [ccode] 
    #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 
    [/ccode] 
    Hope that helps 
    Submitted By: gatman (2001/06/08)
      

  3.   

    没有找到jet
    就是access 文件的驱动程序
      

  4.   

    BOOL C*****App::InitInstance()
    {
    AfxEnableControlContainer();加上: AfxGetModuleState()->m_dwVersion = 0x0601;  
    }
    就OK拉
      

  5.   

    人家说的很清楚了:
    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 
      

  6.   

    see the MFC part of readme.htm of Visual Stdio 6.0 Service Pack 3 or higher