Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with SCAN and DO WHILE
Message
From
13/08/2002 18:10:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00688704
Message ID:
00689364
Views:
19
>Hi,
>
>If you have an index order set for the table you are using and you change the value of that field, it might cause the problem you are having.

And the solution for that case (if the key really must be changed) is
seek cKeyValue
calc min(recno()), max(recno()) to nMinRcn, nMaxRcn;
   while KeyExp=cKeyValue
nOrder=TagNo()
set order to 0
go nMinRcn
scan next nMaxRcn-nMinRcn+1 for KeyExp=cKeyValue
   {processing happens here}
endscan
set order to (nOrder)
Worked flawlessly since FP2.0.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform