Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Indexes to VFP tables programmatically
Message
From
16/07/2002 20:20:15
 
 
To
16/07/2002 16:38:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00679363
Message ID:
00679428
Views:
25
I saw that you got your answer from Gordon, but I just wanted to warn you to be very careful when looking at something like Alltrim() in an index. Any function that can create ragged length indices may jump up and bite you later. VFP will only use fixed length indices, so if you use Alltrim() for example, Fox will end up padding to the length of the field and you'll have wasted your time. If you concatenate fields in an index that have been trimmed, then you will likely end up with a dog's breakfast. When you later try to do a seek, you may fool yourself and not get the results you expect.

Alan

>Thank you for your response but that does not address using an expression as the index, only the field name. I need to know if it is possible to add something like ALLTRIM(company_name) as an index to a table. If the INDEX command is the only way to add indexes, please explain how to use an expression instead of just the field name.
>
>Thank you
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform