Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Demystification of the SCAN
Message
De
09/03/2001 16:58:50
 
 
À
07/03/2001 11:46:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00482753
Message ID:
00483727
Vues:
9
>I have a mysterious situation. I would like to know what is wrong with it. This happens occasionnaly. For some kind of reason, the following code, sometimes, will skip the SCAN loop even if _TALLY>0.
>
>
>SELECT MySQL... INTO CURSOR TEMP
>IF _TALLY=0
>   RETURN
>ENDIF
>SCAN
>   This is my scan loop...
>ENDCAN
>Rest of code here...
>
>
>So, I always assumed that _TALLY>0, then the following code should not be executed. Well, sometimes, the SCAN is skipped completely. What can cause that?

I had same situation_ _tally immediately after select into was not reliable.

I think that _tally is like
PARAMETERS(): some code from other windows refres events or menu skip conditions or others will change it.

Change your if statement to

IF RECCOUNT('TEMP')=0

and i'm sure your problem disappears.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform