Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of records in Grid
Message
 
To
04/03/2008 15:46:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01298593
Message ID:
01298654
Views:
16
>>>I need to know how many records are in the grid. I'm getting odd results on a filtered table that populates the grid so I want to know if there is a way to look at the grid itself and know at runtime. Thanks!
>>
>>If you populate the grid via some SQL select statement, you can use _tally instead of reccount().
>
>Wouldn't _TALLY and RECCOUNT() give the same results?

Sorry to jump in, but _TALLY and RECCOUNT() can give different results.
If you run the SQL select command using the NOFILTER clause, then yes, they will return the same, since the results are stored in a temporary cursor.

If you don't use the NOFILTER clause, then there is a chance that you could end up with a filtered result set where RECCOUNT() returns all records in the table and _TALLY will return the number of "filtered" records.

-mike
Previous
Reply
Map
View

Click here to load this message in the networking platform