Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading in an ascii file with FOPEN()
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00194312
Message ID:
00194777
Views:
19
Dore,

FGETS() ends the string at the first CR/LF it finds (or optional second argument maxchars are read), so SDF will work equally well, maybe even faster since it's a single command instead of a loop. If the lines are larger than a single char field can hold you can just use multiple fields and add them together. It also sounded like he needed a processing loop but certainly if all you are doing is grabbing lines with fixed text in them the select would work best.

>David,
>I like your idea. Robert didn't tell us if the ASCII file contains lines that end with cr/lf so we're not sure if APPEND FROM ... SDF will work (or FGETS()). A time saver on your code might be, after you appended the data into FirstAscii:
>
>SELECT * from FirstAscii where searchtext $ cText into table SecondAscii
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform