Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing unique
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00180757
Message ID:
00180852
Views:
17
Um, only if you pack, or have FOR NOT DELETED(), right? Deleting a record doesn't remove it from the index, any more than it removes it from the table, unless you pack. Just thought that should be mentioned.

>I think the thing with uniqe indexes is that if you delete the record that is in the index, it won't automatically stick another it.
>
>For example: Indexed on custname uniquely. There are 5 John Smiths. You delete the John Smith that is the one in the index. There is no longer a John Smith in the index, even though there are 4 others in the table. If you reindex, you pick up one of the others.
>
>-Michelle
>
>
>>OK, now I'm totally confused. After re-reading the docs it appears that if you have a record with a key value of A, change it to B, then add a new record with key value A it won't appear in the index. However, a quick test doesn't bear this out. It seems like there is always one record in the index per key value without reindexing.
>>
>>Anyone?
>>
>>>I don't think you made a mistake. IMO, what Help says actually means non-maintained (at least from common sense point :).
>>>
>>>>Oops, my mistake. I think that's a leftover piece of information from FP 2.0 or maybe even FoxBase+.
>>>>
>>>>>I disagree with your statement "Unique indexes aren't maintained." From the help:
>>>>>
>>>>>When a UNIQUE index or index tag is active and a duplicate record is changed in a manner that changes its index key, the index or index tag is updated. However, the next duplicate record with the original index key cannot be accessed or displayed until you reindex the file using REINDEX.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform