Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_tally
Message
De
06/03/2003 06:23:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/03/2003 06:07:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: _tally
Divers
Thread ID:
00762047
Message ID:
00762053
Vues:
15
>I used to run my queries like this:
>
select * from table into cursor XXX nofilter
>select XXX
>if _tally=0
>messagebox('No data found!')
>else
>report form YYY preview
>endif
>Lately, I started to get the message even if my cursor has lines and I had to change it to the following way:
>
>select xxx
>ntotal=reccount()
>if ntotal=0...
>
>I have the problem with query that worked well till now, what's happening?
>Thank you for answer
>PS
>When I try to get the _tally value I get 0 (even with lines in the cursor).

There may be a difference between _tally and reccount(): Visual FoxPro may simply decide it is more efficient to place a filter on an existing table, instead of copying it to a temporary table (cursor). In this case, _tally is safer.

You can force VFP to copy records to a temporary table, using the NOFILTER keyword.

Hilmar.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform