Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is reccount() misleading
Message
From
05/05/2006 06:14:59
 
 
To
05/05/2006 04:19:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01119230
Message ID:
01119515
Views:
22
>>>Hi
>>>
>>>I remember an issue where reccount() could be misleading after a query is not using nofilter. Anyone else remember that or have an example. Or am I just wrong.
>>>
>>>
>>>Thanks
>>>
>>>Nick Mason
>>
>>You're right, use nofilter.
>>Cetin
>Hi Cetin
>
>I thought one argument against automatically using nofilter is that it can be slower as recorda hev to be physically written everytime. I usually check _TALLY to find how many records have been selected. Do you think that is always accurate.
>
>Nick Mason

_tally is correct, but many bug and issue exists.

The more important is:
you can use SET FILTER TO and this destroy the virtualtable
CLEAR
CREATE TABLE mytable (fld I,fld2 I)
INSERT INTO mytable VALUES (1,0)
INSERT INTO mytable VALUES (2,0)

INDEX ON fld TAG fld1
INDEX ON DELETED() TAG deleted

SELECT * FROM mytable WHERE fld = 1 INTO CURSOR virtualTable
? "tally is ok",_TALLY

* SET FIELDS don't work
SET FIELDS TO fld2
SET FIELDS ON
BROWSE

SET FIELDS OFF

* expected a error like: "SET FILTER is locked" 
SET FILTER TO 
COUNT
? "now you see 2 records",_tally
BROWSE

* and more ...
Previous
Reply
Map
View

Click here to load this message in the networking platform