Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading text file
Message
 
To
04/12/1997 18:19:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00063889
Message ID:
00063970
Views:
50
>What's the best way to read a text file and save it to table? I want to parse a text file and maybe if i can only use a SUBSTR() function of VSF and save it to table but I know I can't do that. Thankx

Richard,

If the format of the text file is simple enough, you can use the APPEND FROM command. Use the TYPE SDF clause of the APPEND command if the file contains fixed-length un-delimited records and the DELIMITED WITH clause if the fields are delimited.

If the text file requires more sophisticated parsing, you can use low-level file functions. These include FOPEN(), FGETS(), FREAD() and FCLOSE(). Check out the documentation for these functions.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform