Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using FOPEN() and FREAD()
Message
From
02/06/1999 12:37:42
 
 
To
02/06/1999 12:31:13
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00225449
Message ID:
00225455
Views:
14
>Under 5.0, in the command window, when I issue x=FOPEN('mytable.dbf'), x becomes the file handle of the opened file. When I issue =FREAD(x,100) or FGETS(x,100), I get what I thought would be the first 100 bytes of the table -- the header and then some -- but I can't read it. Is there some trick to this and interpreting what's returned? I'm trying to evaluate the first byte in the header to know if I'm dealing with a usable/readable DBF. All I get is '0c' followed by a bunch of graphic characters, then eventually readable A-z, 0-9 readable text.
>
>Any direction greatly appreciated.

Been a long time since I messed with dbf headers and there are others here that can give a lot more details. But basically I believe the headers are not straight ASCII text but contain binary/hex? data in them which won't show up as "plain" ASCII characters when you view them. Someone more knowledgable on the issue can/will probably give you more details.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform