Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN Surprise
Message
From
27/09/2010 15:18:59
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01482888
Message ID:
01482919
Views:
79
Thank you Sergey. That is why I was so surprised.

I SET ORDER TO nothing after creating indices for DTemporal and the problem was solved.

Alex

>SCAN w/o additional clauses always starts from the top based on the current index set.
>
>>Was just surprised when SCAN doesn't start with the first record but the current record. The intent was to examine all records.
>>
>>The code is:
>>
>>
>>* cursor DTemporal is created with SELECT .... INTO CURSOR DTemporal READWRITE
>>INDEX ON xxx TAG xxx
>>...
>>DELETE ALL FOR <condition> IN DTemporal
>>* Several records are added.  Current record is last one added.
>>* The index has no effect on the order, at least as shown by BROWSE
>>
>>...
>>
>>SELECT DTemporal
>>SET DELETED OFF && To see all records
>>* The intent is to examine all records
>>SCAN
>>      IF DELETED()
>>...
>>ENDSCAN
>>
>>
>>The solution in to add GO TOP, of course, but I sincerely expected the SCAN to start with the first record. Instead it started with the current record.
Previous
Reply
Map
View

Click here to load this message in the networking platform