Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NOFILTER on SELECT is implicit ?
Message
From
17/07/2003 11:36:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/07/2003 11:17:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00811089
Message ID:
00811106
Views:
15
The basic idea is that if you omit NOFILTER, VFP decides whether it is more efficient to use a cursor or a filter. I see no problem with this decision changing from one version to another.

You can't trust VFP to use NOFILTER implictly, that much is clear. If it does so in one version or with one set of data, this might change with another version, or another set of data.

Just make sure that if you need the result of a SELECT for an additional SELECT, you always use NOFILTER in your first SELECT.

>Hi,
>
>run this code in VFP6SP5,VFP7SP,VFP8.
>
>
>CREATE CURSOR TEST (n I)
>nCycle=100000
>FOR I=1 TO m.nCycle
>INSERT INTO TEST (n) VALUES (RAND()*m.nCycle)
>NEXT
>INDEX ON n TAG nix
>? RECCOUNT()
>SELECT * FROM TEST WHERE n>100 INTO CURSOR Filtered
>? RECCOUNT(),_TALLY,FILTER()
>
>
>On VFP6SP5 Filtered is a filtered cursor of test,
>then any changed on TEST is see on Filtered.
>
>On VFP7SP,VFP8 Filtered is a table cursor,
>like if you use NOFILTER clause,
>and changed on TEST is not see on Filtered,
>then any old program can change result randomly.
>
>Is it a new behaviour of VFP7 and VFP8 ?
>
>I can't found documentation on this.
>
>Never surprise, it is normal for VFPT change function without document it.
>
>Fabio
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform