>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