Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help me please...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00171168
Message ID:
00171192
Views:
27
Yes, but, "what Nick said".

If you know the position and length of each "field" in the .dat file, you will probably be much better served with APPEND FROM ... TYPE SDF than low-level file I/O commands. Is there a very important reason you're using low-level file I/O, or is it just that you found those commands in the book before you found APPEND FROM?

Using APPEND FROM will run much faster, and make your code more compact and readable, if you can use it. Just set up a dbf with field types and lengths which match the .dat file's, and try appending into it. APPEND FROM is an awsome tool if you have to get data from text files into dbfs! Well worth getting to know!

The only situation I've seen in years where it made sense to use low-level file I/O instead of APPEND FROM to read from a text file with fixed-length records, was a case where the number of fields in the text lines were too many for a single dbf, or the length of the text lines were more than the allowed dbf record length.

Rich Addison, ERW, Inc., Southfield, MI
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform