Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STR in an index
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01146822
Message ID:
01147058
Views:
28
Thanks to Grigore, Naomi, Greg, and Mike. I am reviewing another programmer's code and saw the index expression I mentioned and my memory was that this was not good practice, but I've never used an index like that, so I wanted to confirm my memory. It still works (somewhat <g>).

>These indexes are the source for error 2199 (Error building key for index "name"). I've ran in this problem last week when I deleted all the records in a table in a system I'm converting to SQL Server, and after deleting all records, first INSERT gave me the above error. The only way to make it go away was to remove the offending indexes (there were two of them).
>
>>I'm not sure I ever did this much, if any, and so it's been awhile since I thought much about this, but isn't it going to cause a problem if you create an index on an integer field where the index expression is ALLTRIM(STR(INTEGER_FLD))? That's going to create a variable length index, correct? And I'm not sure why you would index such a field - which is the PK in the table in question - on anything other than just the field itself (in other words, the index expression just contains the field name).
>>
>>Russell Campbell
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Previous
Reply
Map
View

Click here to load this message in the networking platform