Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading in an ascii file with FOPEN()
Message
 
 
À
05/03/1999 12:31:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00194312
Message ID:
00194777
Vues:
20
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform