Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Scan..EndScan code help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00166652
Message ID:
00166771
Vues:
24
>Interesting. Learn something new every day. I am a natural skeptic, so no matter what MS tells me or what my own future testing indicates, I will probably still explicitly reselect to the scanned table right before the ENDSCAN if I switched WAs. It's a peace-of-mind [and readability] kinda thing. :)


Mark,

Here's the problem with the code that has been posted;
SELECT Customer
...
SCAN WHILE ...
   SELECT Otemp
   ...
   SELECT Collat
   ...
   SELECT oTemp
ENDSCAN
This code first selects customer and starts a scan loop, at the end of the loop it selects oTemp, but the ENDSCAN selects customer again. The record pointer is never moving in oTemp so teh same record gets processed over and over again until the customer hits a record that fails the WHILE clause. Also the same record in Collat is hit with an update from the same oTemp record for every customer record.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform