Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a simple way to identify VFP tables?
Message
From
13/10/2003 10:57:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00838027
Message ID:
00838111
Views:
15
>Hi All,
>
>I am looking for a simple way to identify VFP tables. My app can come across several different types such as dBase2 and I want only to be able to open the VFP ones. When I look at the table stru in help I see that first byte is x'30' for VFP. What is the best way to check this from inside of VFP? Any assistance would be most appreciated.
>
>Regards Rex

Rex,
Besides lowlevel functions you could check the header() vs fcount(). VFP tables have an extra 263 bytes backlink space in header. ie:

lVFP = ( (Fcount()+1)*32+263+1 = header() )

or :
lVFP = ( Header() - (Fcount()+1)*32-1 = 263 )

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform