Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_tally
Message
 
À
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:
00762186
Vues:
16
I have found that if you execute _tally immediatley after the query it is correct.

SELECT * FROM table INTO Cursor
IF _TALLY > 0 .. etc

If you have any commands in between the query and your _tally command sometimes the _tally value has been changed by something inside VFP. ( don't ask me what I just know it happens )

SELECT * FROM table INTO Cursor

* some code in here

IF _TALLY > 0 .. etc

For a way to always have a tally accurate, immediately after a query I assign _tally to a variable before doing anything else. This way I can do other things necessary before I check _tally and go from there based on it value.

SELECT * FROM table INTO Cursor
lnTally = _TALLY

It is the same reason I always have a SELECT TableAlias as the last line of a set of instructions inside a SCAN ... ENDSCAN, because on occasion VFP forgets what table it is scanning when it hits the ENDSCAN.

MLW
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform