Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why reccount() and _tally are different ?
Message
From
08/05/1998 00:47:18
 
 
To
07/05/1998 09:10:09
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00097511
Message ID:
00097918
Views:
39
>reccount() is the record count of the CURRENT work area... which, as you can see from your code is t1...

Nope! SELECT-SQL changes the current area to the result. So, after a SELECT, the current area is the one of the result set and not of the source table(s) or the one that was current previous to the SELECT.

So, RECCOUNT() returns the number of the records in the current area, which is the one of the result set. BUT, the result set may be only a filter on the real table, so, the RECCOUNT() may return in fact the number of records in the real table (similar to a table that has an active filter). If the result is a real cursor, RECCOUNT returns the same thing as _TALLY.

>So... as someone said, prior to your reccount() you have to select tmp or pass the alias to reccount() ie. reccount('tmp')... if you do this they should match.

Nope. The same reason explained above.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform