Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LOCATING backwards
Message
From
25/10/2003 02:50:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/10/2003 13:18:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00842157
Message ID:
00842565
Views:
27
>Timothy, et. al. (via Çetin)-
>
>>
>>>can you use the locate cmd to start at end of a dbf and proceed backwards?
>>>
>>>If you set your index descending yes :)
>>>Cetin
>>
>>Something like (untested) :
>>
>>If val(sys(21))>0
>> lcDescending = iif(descending(val(sys(21)),'myAlias'), ;
>>	' ASCENDING ',' DESCENDING ')
>> Set order to tag (order('myAlias')) &lcDescending
>>endif
>>
>
>Please review this KB Article http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q165410 before using this technique. If you're depending on buffering and using a grid, this bug has the nasty side effect of not respecting the buffering let alone the data session.
>
>In my case I found it worked to simply scan to find the previous value, but I had a guaranteed small data set.

Nancy,
Right. However my technique in real production is only used for 'descending' via a dummy constant key :

index on .t. tag RevOrder descending && Any constant expression as key

So any operation that needs 'reverse' moving use this order whilst other do not need an order.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform