Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select into cursor nofilter option
Message
De
27/03/2002 20:15:45
 
 
À
27/03/2002 18:35:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00638193
Message ID:
00638228
Vues:
21
I'll give this a shot...

VFP without the NOFILTER clause may (read: usually will) "return" a "filtered result set".

I put "return" in quotes because because it doesn't really "return" anything - it simply applies a filter against the original table.

This works fine when referring to the "result" cursor records directly (at least I think it does), BUT there are side-effects. RECCOUNT(), for instance, will return to total records in the origin table, NOT the number of records in the (alleged) cursor.
Its been so long since I had the problems that I don't remember, but siffice to say that NOFILTER was a long overdue "fix" (though in my opinion it was done backwards).
I believe that using the "result" cursor in a later SQL-Select causes it to lose the filtering, resulting in incorrect results.

Someone with a better memory for the details hopefully will give more concrete examples.

Cheers



>VFP 7 doc states the following
>
>
>"Include NOFILTER to create a cursor that can be used in subsequent queries. In previous versions of Visual FoxPro, it was necessary to include an extra constant or expression as a filter to create a cursor that could be used in subsequent queries. For example, adding a logical true as a filter expression created a query that could be used in subsequent queries:
>
>SELECT *, .T. FROM customers INTO CURSOR myquery
>Including NOFILTER can reduce query performance because a temporary table is created on disk. The temporary table is deleted from disk when the cursor is closed. "
>
>But it never seemed to be problem( at least in VFP6 ) and it is not a problem in VFP7 for
>
>SELECT * FROM customers INTO CURSOR myquery
>select * from myquery where cust_id = some_id into cursor myquery1
>
>What is meant by "subsequent query" then ?
>
>Thank you
>Michael
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform