Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why SCAN does not EXIT?
Message
De
15/08/2002 13:25:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00689830
Message ID:
00690069
Vues:
16
Dennis (and Ulises),

>I have had a similar problem. Add "SELECT TABLE1" just before "LOOP".<

Well, that *may* solve that problem, but only because of the LOOP. You don't need a LOOP inside of a SCAN/ENDSCAN and in fact, I doubt if it will work correctly (that's most likely what the original problem was). In a SCAN/ENDSCAN, if you have selected another table somewhere in the code, when VFP hits the ENDSCAN to "go around again", it automatically selects the "driving" table. There is no need to do it in code.

~~Bonnie


>I have had a similar problem. Add "SELECT TABLE1" just before "LOOP".
>
>>Hi all.
>>I have a few lines of code like this:
>>SELECT TABLE1
>>GO TOP
>>xCOUNT=0
>>SCAN FOR OWE <> 0
>>STORE idSTD TO xidSTD
>>SELECT TABLE2
>>LOCATE FOR idSTD=xidSTD
>>REPLACE OWE WITH TABLE1.OWE
>>xCOUNT=xCOUNT+1
>>LOOP
>>EXIT
>>ENDSCAN
>>
>>Problem is it keeps going into an endless loop, without exiting when the last match is found. What am I missing?
>>
>>TIA
>>Ulises
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform