Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help me please...
Message
From
29/12/1998 11:09:50
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00171168
Message ID:
00171197
Views:
33
Hiya Rich ----

Timeout on the APPEND FROM! There are a number of situations where you can't easily use APPEND FROM.

I'm involved with a project where I have to parse a traditional card-layout type of ASCII file, with header and detail records in the same contiguous file but with different layouts.

In this case and other cases where extra-long fields or record layouts are involved, APPEND FROM is impractical or impossible.


>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
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform