Sabtu, Mei 10, 2008

Memperbaiki File Dbf Yang Corrupted

{ Vfp Code }
SET SAFETY OFF
SET TABLEVALIDATE TO 0 && No Table Validation performed
Use cFileCorruptedName
Copy to cTempFile && Ada bagusnya cTempFile diletakan di GETENV("Temp")+"\cTempFile"
Use cTempFile
Copy to cFileCorruptedName
*** Jika ada Index File maka tambahkan command berikut ini, dan jika tidak abaikan.
IF FILE("cFileCorruptedName.cdx")
Use cFileCorruptedName Exc
SET INDEX TO cFileCorruptedName.cdx
ReIndex
Endif
CLOSE ALL
SET TABLEVALIDATE TO 3 && Return to Default Level
*** End Statement
USE IN cTempFile
DELETE FILE cTempFile

{ End Code }

Tidak ada komentar: