Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reccount(), nofilter, readwrite
Message
De
01/11/2009 20:10:03
 
 
À
01/11/2009 19:39:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01432586
Message ID:
01432605
Vues:
38
>>Hi,
>>
>>It seems to me that I cannot rely on using RECCOUNT() to report number of records in a cursor (created with SQL Select) unless I use NOFILTER or READWRITE. That is, in my test, RECCOUNT() often returns number of records in the FROM table of SQL Select instead of the cursor. Is this correct?
>
>Yes. Basically, Visual FoxPro may decide it is more efficient to USE...AGAIN a table and put a filter, instead of selecting into a separate cursor. While all this is internal, and automatic, you do notice the difference sometimes, especially with the recno() and reccount() functions.
>
>The solution is to either use _tally to save the number of records selected to a variable, or - as you mentioned - use the NOFILTER clause.
>
>NOFILTER has another important use, too. If Visual FoxPro were to decide to internally use a filtered table instead of a separate table, you can't use that to SELECT into another cursor. With NOFILTER, you assure that you can SELECT from the result of the query, to another query.

Thank you for the explanation.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform