Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Demystification of the SCAN
Message
From
09/03/2001 16:58:50
 
 
To
07/03/2001 11:46:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482753
Message ID:
00483727
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform