Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key
Message
From
05/03/1997 10:46:20
 
 
To
05/03/1997 05:37:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00022912
Message ID:
00022953
Views:
33
>In my system, delete record is not an avoidable event.
>I delete the record by delete command only(mark the record deleted), I physically remove them sometime in the program by the Pack.
>When the record is marked for deleted, it still violate the pirmar key rule. If the deleted record have the same key value.
>How can I solve this problem? I solve it by include !deleted() in the primary key definition. Is it the best method?

The problem should be resolved by sophisticated inserting of new records, i.e. you check for new record key uniqueness for all records in table (deleted and non-deleted). If you want to use key from deleted record anyway, you can just recall the record and replace values instead of inserting.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform