Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field Count
Message
De
14/12/2000 15:17:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00453472
Message ID:
00453590
Vues:
23
>>Hi Everyone:
>> I want to count the number of fields there are in a delimited text file. Here is my code.
>>
>>****code******
>>FSEEK(lnHandle, 0,0) ** seek record
>> DO WHILE !FEOF(lnHandle)
>> lsBuf = FGETS(lnHandle, 1024)
>> && lsBuf contains a record. I.E. lsbuf = '|F845|,2569,69899,0,0,25989,1
>> What I need is to get the number of fields in this record. In this case
>> there are 7 fields in the record.
>> EndDo
>>Thanks
>>MA
>

>The number of fields in a record is equal to the number of field delimeters + 1
>
lcFieldDelim = ","
>lnCount = OCCURS(lcFieldDelim, lsBuf) + 1
Oh yeah, sorry about that.
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform