Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uniqueness of index PART_ID is violated
Message
De
09/01/2001 14:52:03
 
 
À
09/01/2001 11:04:11
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00461037
Message ID:
00461375
Vues:
13
What part is confirmed by Erik? Are we assuming that the same part number must be reused? If so, you are correct, that some mechanism must be in place that will allow you to reuse the part number. I don't know enough about the requirements in this specific instance to say if the index should be filtered in !DELETED() or if the record should be RECALLED and updated.



>Craig,
>
>The following is comfirmed by Erik Moore.
>
>>>PART_ID is primary index key, the orginal PART_ID(e.g. 01-001 ) record have been marked delete(), but not PACK. User add a new PART_ID, same number (01-001), and updated by tableupdate() function in our application EXE file which build up by VFP6. The error message "Uniqueness of index PART_ID is violated" displayed. Please help! What can I set unless change the type of index key.
>
>>There have been several discussions here on the UT as to whether or not you should have a PK filtered on FOR !DELETED(). I'm in the camp that the record still exists, therefore, the PK should not be reused. On my web site (click the company name above) is an article that discusses PKs and how you can generate unique PKs for each record.
>
>The problem with this approach is that though you add a surrogate key, you still have to ensure that the PART_ID is unique. The only proper way to do this IMO is by using a candidate index
>
>If you've done this you have not solved the problem at all. You've shifted the problem from the primary key to the candidate key (See recent discussions with Erik).
>
>You still have to filter the candidate key on FOR !DELETED() if you use sorrugate keys.
>
>Therefore this problem does not have Anything to do with the use of surrogate keys. You won't solve the problem with surrogate keys !! It makes no difference whether you filter the PK or the CK on FOR !DELETED().
>
>Walter,
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform