>I am working in VFP 5.0a and have a 2.6 program running. The program is a screen for data entry. When I delete a record the program will mark the record for deletion. That part works great, the problem is when I input another record with the same value in the primary key field I get a "uniqueness violation". I understand that a primary key needs to be unique but why is VFP not ignoring the the deleted records? I used SET DELETED ON in the setup code and within the 2.6 program but it seems to make no difference. How do I get VFP5.0a to ignore the deleted records so that I may reuse a value within the primary key field?
>
Because the value of the DELETED() flag is not an element of the primary or candidate key. The importance of the DELETED() flag is not constant (IOW, SET DELETED OFF and VFP is
supposed to ignore the fact that it's been deleted) so it can't be used as a filter for the primary or candidate key unless you specifically scope that key to always consider the DELETED() function - either with a FOR clause, or by concatentating or modifying the value of the key field using the DELETED() flag. And the second will break as soon as you delete the second occurance of a key vale...
>Thank you,
>Jennifer from CA