Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5: Primary Index
Message
 
À
15/05/1997 11:14:24
Jim Si
Alberta Research Council
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00032427
Message ID:
00032440
Vues:
43
>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
Fil
Voir

Click here to load this message in the networking platform