Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looping through all the records in a table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00020079
Message ID:
00020201
Vues:
44
>>>I can't seem to get started with the program code to loop through (top to bottom) the records in a table. Can someone help?
>>
>>SCAN
>>...
>>ENDSCAN
>>are one option; another is
>>DO WHILE .NOT. EOF()
>>
>>ENDDO
>>
>>SCAN is preferred since it can be rushmore optimized and auto-skips to the next record.
>
>There is also the old For loop...
>GO TOP
>FOR i = 1 to RECCOUNT()
>...
>SKIP 1
>ENDFOR
>
>For is supposed to be faster than While but slower than Scan, but each one of these types of loops is most appropriate for different situations...

Well put! There are times when I actually use a Do While over a SCAN...
Steve Medvid
Systems Analyst

Environmental Resource Management
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform