Corruption

Clipper / DBF 錯誤

  • June 29, 2015

我無法打開 Clipper 應用程序(該應用程序已有 15 年曆史),因為我得到:

error dbfntx/1012 corruption detected

除了從上次備份恢復之外,還有什麼方法可以修復損壞的 dbf 文件?

如果您有權訪問 Visual FoxPro 命令行視窗,請鍵入:

SET TABLEVALIDATE 11
USE "YourTable" EXCLUSIVE    && If the table is damaged VFP must display an error here
PACK    && To reindex the table and deleted "marked" records
PACK MEMO    && If you have memo fields

之後,表的結構必須是有效的。如果您想查看包含無效數據的欄位,可以嘗試:

SELECT * FROM YourTable WHERE EMPTY(YourField)   && All records with YourField empty
SELECT * FROM YourTable WHERE LEN(YourMemoField) > 200   && All records with a long memo field, there can be corrupted data

或者您可以嘗試使用以下來源:

  1. http://www.idganswers.com/question/14773/how-to-fix-dbf-file-error-missing-the-support-library
  2. http://www.instructables.com/answers/Corrupt-dbf-file/

引用自:https://dba.stackexchange.com/questions/105352