Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uniqueness of key violated problem...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00031721
Message ID:
00031726
Views:
46
>>Hi,
>>
>>I'm having some trouble attempting to APPEND or INSERT INTO a table contained in a DATABASE. The table has a primary key and I've deleted some of the previous records and then when I attempt to add new ones that might have the same key as some of the deleted ones, I get the UNIQUENESS OF KEY VIOLATED error. I believe DELETED is set off. The only way I can get this to work is to PACK the table, but then I have to open it exclusivly, and that poses some problems sometime.
>>
>>Has anyone delt with this before in a good way?
>
>Jim
>
>One way is to erase the contents of a 'deleted field' and re-use the existing field. Just basically fakeing the user to thinking it is a new record. It is sometimes called 'recycling'.
>
>HTH,
>Tom

This is not exactly the solution for his problem. Because the uniqueness is violated because the key already exists in another deleted record.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform