Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Matter of interest
Message
From
12/04/2002 07:26:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/04/2002 06:55:53
Philip Jones
Cornwall County Council
Truro, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00644142
Message ID:
00644150
Views:
10
>Hi I am upgrading a system originaly written in Fox 2.2 (I think it was 2.2) for DOS. I'm converting it into Vis Fox 6. Some of the index tags in the tables use character prime key fields and do this with DATE fields.
>
>'primekeycharacterfield' + STR(999999-(AS_DATE-{01/01/1900}),6)
>
>I figure that subtracting {01/01/1900} from the date and then subtracting from 999999 will give descending values. The later the date the higher the value.
>I'm wondering why the didn't just create a descending index.
>It wouldn't make a difference whether the prime key values were in ascending or descending order, it's only the dates that matter.
>Could you not create descending indexes in Fox for dos?

Yes, you could. But descending indices are not used, e.g., by Rushmore Optimization. So, many developers prefer to use only ascending indices, and open them in descending order, when required.

Also, this particular programmer perhaps did want to have the first field in ascending order, and the second, in descending order.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform