Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1884 - uniqueness of primary key is violated
Message
From
02/05/1999 23:25:27
 
 
To
02/05/1999 22:16:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00214399
Message ID:
00214466
Views:
15
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform