Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reccount()
Message
De
26/01/2010 18:29:22
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
26/01/2010 15:42:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01445855
Message ID:
01446074
Vues:
36
>>Count command moves the record pointer. SQL select doesn't.
>
>IF eof ()
>exit
>endif
>
?

That would work. Not too elegant, though - exit means you're exiting a loop, so why not make a loop which knows when to exit? Scan/endscan is one such loop, it automatically exits on eof() and runs once per visible record in the given scope (and I think you'll love the scopes - check "scope clauses", "for clauses" and "while clauses" in help, then look at the bottom at the number of commands which have them... which is altogether the nice thing about Fox, how you can combine them at will).

So, time to rethink what you're doing. Why do you have a for-next loop, and can it be done with a different loop? Maybe you don't need a loop at all; if you're showing multiple records, maybe you could use a grid?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform