Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell type of DBF File
Message
De
02/08/2002 16:12:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00685625
Message ID:
00685688
Vues:
15
>Greetings -
>
>What's the best way to tell--without first openning, if at all possible--the type of DBF (Fox2X v. Visual) you are dealing with? It's a long story, but I need to be able to tell the type of file it is so I know whether I can "poke" at the DBF Header and determine what the DBF's DBC backlink is. Seems in non-Visual Tables the utility I am using to get that info just returns actual data from the DBF.
>
>Thanks!
>________________
>_____/ Regards,
>____/ al
>___/
>__/
>_/
>/

This is documented in help, under Using Visual FoxPro | Programmer's Guide | Appendix | Table File Structure.

It seems the very first byte indicates the file type.

You can get at this information with low-level file-functions (in this case, you will need fopen(), fread() and fclose()).

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform