Information générale
Catégorie:
Codage, syntaxe et commandes
>I want to recycle the deleted records in a table. Lets say the table is 'table1'. The 'table1' has a primary index on the field 'NO'. I have a record with the 'NO' value 5 and the record is marked deleted. If I append a record, set the 'NO' value 5. The message 'Uniqueness of index NO is violated'. I tried set deleted on. It won't help.
>
>To my knowledge, if the record is marked deleted when the set deleted on, logically it does not exist. Why I have the key violation? I don't understand. Help please?
FoxPro compares a new key against deleted and non-deleted records. One way around this is to set a filter on the primary key to DELETED(). Since filtered indices are not Rushmore optimizable, you might want to create a regular index with the primary key expression with no filtering.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement