Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index does not match file
Message
De
18/09/2017 07:09:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01654385
Message ID:
01654408
Vues:
42
>>>>>>>I am getting index does not match the file - is there any easy way of finding our which file that is - it is a very large system with masses of files
>>>>>>>
>>>>>>>Thanks
>>>>>>>
>>>>>>>Colin
>>>>>>
>>>>>>No easy way, other than opening the tables one by one. If all the tables are in the same folder, you can easily create a program to do this with Sys(2000) in a loop.
>>>>>>
>>>>>>If the system had a proper error handler, it would have shown you which table it was, since this error will appear on the line where you open the tabl
>>>>>
>>>>>Any chance you could give me a quick program checking all files in j:\global
>>>>
>>>>This simple program will give an error message if opening a table fails, and if you don't have an error handler active. Nothing advanced, I wrote this program in a few minutes to comply with your wish.
>>>>
>>>>
lparameters tcDir , tcSkeleton
>>>>if empty(tcDir)
>>>>   tcDir = 'data'
>>>>endif
>>>>if empty(tcSkeleton)
>>>>   tcSkeleton = '*.dbf'
>>>>Endif
>>>>tcSkeleton = forcepath(tcSkeleton,tcDir)
>>>>llFirst = .T.
>>>>clear
>>>>do while .t.
>>>>   if llFirst
>>>>      lcFile = sys(2000, tcSkeleton)
>>>>      llFirst = .F.
>>>>   else
>>>>      lcFile = sys(2000, tcSkeleton, 1)
>>>>   endif   
>>>>   if !empty(lcFIle)
>>>>      lcFile = forcepath(lcFile, tcDir)
>>>>      use (lcFile)
>>>>      ?lcFile
>>>>   else
>>>>      exit
>>>>   Endif
>>>>Enddo
>>>>
>>>>Please note that I am not sure that an index corruption will always raise an error.
>>>
>>>Thanks but I get unrecognised command verb on the line lparameters tcDir, tcSkeleton
>>
>>I don't. Which version of VFP do you use?
>
>I was trying to specify the directory this caused the error - my files are in j:\global how do I specify this in the code

The first parameter is tcDir, should give you an idea... :-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform