你哪有备份呀?access数据库 直接复制文件就行了

解决方案 »

  1.   

    备份:
    CString s;
    s = "command /c copy c:\\a.mdb c:\\back\\a.mdb /y"
    WinExec(s,SW_HIDE);恢复:
    恢复时不能使用该数据库
    CString s;
    s = "command /c copy c:\\back\a.mdb c:\\a.mdb /y"
    WinExec(s,SW_HIDE);
      

  2.   

    CString s;
    s = "command /c copy g:\\myproject\\174.mdb g:\\back\\174.mdb /y";
    WinExec(s,SW_HIDE);
    还是不行呀!
    怎么办?
      

  3.   

    BOOL CopyFile(
      LPCTSTR lpExistingFileName, // name of an existing file
      LPCTSTR lpNewFileName,      // name of new file
      BOOL bFailIfExists          // operation if file exists
    );
    BOOL CopyFileEx(
      LPCTSTR lpExistingFileName,           // name of existing file
      LPCTSTR lpNewFileName,                // name of new file
      LPPROGRESS_ROUTINE lpProgressRoutine, // callback function
      LPVOID lpData,                        // callback parameter
      LPBOOL pbCancel,                      // cancel status
      DWORD dwCopyFlags                     // copy options
    );
      

  4.   

    需不需要路径,他默认的是什么?
    BOOL CopyFile
    BOOL CopyFileEx
    是要自定义吗?
      

  5.   

    hww02(hww02) 的方法非常好!
    搞定了,谢谢各位的帮助!
    给分了!