Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dbf?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Dbf?
Divers
Thread ID:
00588853
Message ID:
00588857
Vues:
29
>Hello All,
>I am receiveing files that do not have the dbf extension. Is there a way to check to see if a file is a foxpro table or just a txt file?
>

Sandy,

One way is to try to use the file and trap for an error:
local lcOldError, llUseError
lcOldError = on("error")
llUseError = .f.
on error llUseError = .t.
use "myFile.txt" in 0
on error &lcOldError
if llUseError
    * unable to open file, not a table
else
    * file is a valid table
endif
HTH,
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform