Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_tally system variable
Message
De
12/11/1998 19:08:20
 
 
À
12/11/1998 15:38:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00157147
Message ID:
00157240
Vues:
19
>>I'm using the _tally system variable to decide whether or not to print a report after runing a SELECT SQL.
>>
>>Sometimes the _tally variable has a value of 6545264 when there are actually 0 records returned.
>>
>>I have coded around this problem...
>>
>>i.e.
>>
>>if _tally > 0 and _tally != 6545264 then
>> repo ... ...
>>
>>I was just wondering if anyone else has run into this problem before...
>>
>>Thanks for any enlightenment
>
>Yes, since MS introduced filter/nofilter cursor the trustworthy of _TALLY is somewhat diminished (btw I would test it with NOFILTER, if you SELECT inot cursor). I didn't meet particular problem you mention, but if I would then I should better use RECCOUNT()<>0 to have safer code.

Ye-gads,
Now we can no longer test the result of a query. RECCOUNT() will fail if the query is fully optimisable, because reccount() will return the number of records in the underlying table - unless you specify the NOFILTER clause which will slow it down.
So some time ago I stopped using RECCOUNT() and always used _TALLY. Now it's a dud there's nothing reliable left!
:-((
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform