Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Composite key on numeric columns
Message
From
27/02/1999 10:48:39
 
 
To
27/02/1999 10:38:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00192305
Message ID:
00192337
Views:
13
>Ed
>
>Thanks for the help.
>
>I am wondering why VFP does not support a true composite key indexing?

I don't understand - I gave you several different methods for implementing composite keys; concatenation, bit-shifting, value multiplication. You can combine any number of fields into a key; a key expression must be of a uniform type. What's wrong with any of the methods?

You can combine any type of field with any other type of field in a composite key through string conversion and concatenation. You can even construct structures by representing values in binary character expressions; VFP uses a BString type of representation, where the length of the string is expressly encoded in the string expression, so you can build pure binary structure expressions. You can even construct methods where two portions of a composite key are in different relative ordering; for example, using an additive/multiplicative solution, where the size of nKey2 is known to be in the range 0-9999, you can construct a composite key where the order is ascending on the first nKey and descending on the second key by using the expression:

nKey1 * 10000 + (9999-nKey2) to build the composite key.

Perhaps you need to examine the capabilities of the language a bit more closely.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform