>i have problem with table with a primary key. for expample I delete a registry and then I try to add a new registry with the same value VFP give me an error that the registry exist.
>how can i resolve this?.
The primay key index includes deleted records until you pack. One solution is to create your primary key index with a FOR !DELETED(). This will not be optimizable, so create a non-primary index on the primary key as well.
But the better option is to not re-use a primary key. If your primary key is a surrogate (not having any meaning except a unique identifier of the record), then there's no reason to ever re-use it.