Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Scan..EndScan code help
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00166652
Message ID:
00166771
Views:
15
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform