Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ATRANGE BEHAVIOR OF DELETED RECORDS IN VFP3
Message
De
21/03/1997 19:34:07
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
21/03/1997 17:04:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00025245
Message ID:
00025259
Vues:
26
>>Has anyone seen this behavior?
>>
>>
>>I have a CANDIADTE KEY on a customer table called cust_id
>>
>>if I delete it, and set deleted on VFP3 still takes it into account when
>>appending new records and I always get the great message
>>
>>INDEX KEY VIOLATED....
>>
>>Does anyone know why? or how to fix it or get around it?
>
>this is not really strange and quite expected actually
>when you delete a record in VFP it is not erased from the table (until you
>PACK or something like that)
>and basically you can RECALL that record
>this is why you can't have a new key with the same value..
>this is also one way of solving your problem by recycling the deleted
>record with the new values..
>
>
>Arnon

The answer is to build your candidate key on an index expression like INDEX ON FIELDNAME TAG CKFIELDNAME CANDIDATE FOR !DELETED() and also to INDEX ON FIELDNAME TAG FIELDNAME. VFP will ignore deleted records in the CK checks. I add the second index tag because VFP will not use tags that have .NOT. in them (or the exclamation mark) in Rushmore operations.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform