Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reccount()
Message
From
26/01/2010 18:29:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
26/01/2010 15:42:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01445855
Message ID:
01446074
Views:
35
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform