Hi Chuck,
Replace the key with a unique/random string when marking it as deleted.
>VFP 6.0
>
>I have a table that has a primary key index. As discussed in here many times before, it is best to re-use deleted record(s) instead of APPEND BLANK, otherwise, latter is the only way to do it if no deleted record exists.
>
>My trouble is I get "Uniqueness of index MAIN is violated." I get that when a blank record was added and then deleted, but it would also effect if a new record was to be added while the former was deleted. The Primary field is open for unique input, not randomly inserted. I rather use PACK every so often, but doesn't seem to work that way. How to solve this problem?
>
>Chuck
kenweber
GCom2 Solutions
Microsoft Certified Professional