Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why reccount() and _tally are different ?
Message
 
 
À
09/05/1998 08:45:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00097511
Message ID:
00101724
Vues:
70
PMFJIH, Jim, but in scanning the thread thus far, I don't see a definitive answer to Francois' question. The problem he's encountering is that SET TALK is OFF and he's checking _TALLY after creating the index. If SET TALK is OFF, INDEX or REINDEX will reset _TALLY to 0, as _TALLY is "turned off" by SET TALK OFF. SET TALK however does not have any effect on SELECT - it accurately returns the number of records in the result set. However this can bite you if you have a view that is already indexed, have TALK set OFF and issue a REQUERY(). The internal REINDEX that has to occur when the view cursor is repopulated resets _TALLY to 0. This is a case where you either *must* rely on RECCOUNT() to determine the result set, or create the indexes after checking _TALLY, but you have to be careful (as Jim Booth and others have pointed out) that you're getting the number you *think* you're getting.

>Jim,
>
>*Hopefully*, this will be my last words on this subject. . .
>
>Francois was originally asking WHY the results were different. Several people had already told him the difference regarding RECCOUNT()/TALLY when I (finally) wrote.

>>-Steve->>
>>-Steve->>

Steve Sawyer
Geeks and Gurus, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform