>>>In a multiuser environment, it is difficult to use PACK to remove a deleted record. To work around this problem, we can recycle the deleted records. In that case, we do not need to physically remove those deleted records. But in VFP if the table has primary index the deleted records will have a problem with the "uniqueness". I wonder whether there is a simple way to work around it.
>>
>>Sure. Change the key when you delete a record. Depending on how you generate unique keys, you can set a rule to have unique "real" keys and unique "deleted" keys.
>>
>>Vlad
>
>Or, when you reclaim a deleted record you can change the key id to the next available generated id.
This works fine with surrogate keys. But if the key is part of the business info and the deleted keys must be reused, it's better to change it at the delete moment.
Vlad
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only