Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 1884 - uniqueness of primary key is violated
Message
De
02/05/1999 23:25:27
 
 
À
02/05/1999 22:16:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00214399
Message ID:
00214466
Vues:
14
>Thanks for your prompt reply. I set the date as the primary key cuz this table is a child table, and this table is bound to have one transaction record on the same date only.
>
>Your suggestion of recalling the deleted record rather than adding a new one is good, but the steps of what the user do is, clicking the button, focus to the grid, and then they input the transaction date and other details in grid. So, I think it's quite impossible to recall/add a record before I know what the user is going to input. :-(
>
OK. But I still would not let the user change the primary key date. Add a field for the user input, like "inputdate". Have the user enter into this field. Then check the date to see if it is already in the table as a keydate. If it is not, replace the keydate with inputdate and allow the user to proceed. If it is, give a warning and display the existing record for the user to edit.

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform