Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tell type of DBF File
Message
From
02/08/2002 16:12:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00685625
Message ID:
00685688
Views:
16
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform