Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Backup, error found too late
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01183112
Message ID:
01183164
Views:
18
>However, opening the tables is not enough. There are types of corruption where the tables open fine, but the data is corrupt.
>
>>Yes... Once you get them to a backup directory (or you could even check them in the live directory too). You could do the following to make sure the tables at least open natively...
>>
>>
>>lcBadFiles = ""
>>on error llBadFile = .t.
>>lnFiles = adir( laFiles, "SubDirectory\*.dbf" )
>>for lnI = 1 to lnFiles
>>   llBadFile = .f.   && always reset flag before testing next file
>>   use ( "SubDirectory\" + laFiles[ lnI, 1] )
>>   if llBadFile
>>       lcBadFiles = lcBadFiles + laFiles[ lnI, 1] + chr(13)+chr(10)
>>   endif
>>endfor
>>
>>if not empty( lcBadFiles )
>>  messagebox( "Some Bad Files: " + lcBadFiles )
>>endif
>>on error
>>
I agree, but that would just be something I would have put within the
IF llBadFile
ELSE
  */ if not, then check for other data corruption stuff...
ENDIF
I was just giving a baseline on how to cycle through... As for the particulars of checking things like bad data, corrupt indexes, etc, the user would probably build off
ATAGINFO(), TAG(), KEY(), etc functions for indexes, etc...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform