Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem adding record with same deleted Primary Key valu
Message
De
17/10/1997 20:02:33
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
17/10/1997 13:37:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00055190
Message ID:
00055254
Vues:
29
>>Hello,
>>
>>I worked on a table which has a primary index called "Key". This table is included in the DataEnvironment of one of my form, with Private DataSession. Problem occur when I tried to add (by APPENDing) a new record with a value which had been deleted previously. The message I got is "Uniqueness of Index KEY is violated." By PACKing the table after DELETEing a record would solve the problem. Is there any other way (other than RECALLing) which I could use back the same KEY value without having to pack the table? 'Cos I don't want to open the table as EXCLUSIVE.
>>
>>Thanks,
>>juan
>
>You touched the reason why primary key should be surrogate, e.g. sequential number, which will never be repeated.
You can define your primary index to "fieldname for not deleted()". There's been a bit of discussion on this subject, but I think that it is a valid alternative.
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform