>Dear Visual FoxPro users
>
>If I have done a DELETE-SQL and after that I want to do a INSERT-SQL with the same primary key, I got an error message saying that the uniqe number is violated. What is the best way to test if there is a record with the same primary key as the record I want to insert. Here is an example (I haven't tested it)
>
>SET DELETED OFF
>IF SEEK(...)
> RECALL
> UPDATE ...
>ELSE
> INSERT ...
>ENDIF
>SET DELETED ON
i wouldn't use primary keys if the key is able to be reused by another record...