Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Findout corrupted dbf
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01172800
Message ID:
01173069
Vues:
15
>Dear Experts
>
>workdir=getdir()
>
>data1.dbc and all dbf's are located in workdir,
>How to findout corrupted dbf's.
>The name of all corrupted dbf's must store in a c:\corrupt.txt.
>
>Please help

Here's a simple way...
lcBadFiles = ""
on error llBadFile = .t.
lnDBFs = adir( laDBFs, "*.dbf" )
for lnI = 1 to lnDBFs
  llBadFile = .f.
  use ( laDBFs[ lnI, 1 ] )
  if llBadFile
    lcBadFiles = lcBadFiles + laDbfs[ lnI, 1] + chr(13)+chr(10)
  endif 

endfor 

strtofile( lcBadFiles, "c:\corrupt.txt" )
on error
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform