>I deleted a record in a Visual FoxPro table and now I'm inserting another record with the same fields of the primary key of the deleted record.
> The database engine don't alow this insert since we are duplicating the primary key.
> Someone knows how to do this insert and how to avoid this problem with others deleted records?
If this is really the primary key then you shouldn't use a key which is already in the table, after all, this is what primary keys are used for.
What Dave told you is also good because you should have a mecanism of assigning primary key like using a TABLE.DBF to act as a data dictionary which can then be used to know the next value of the primary key and for the locking mecanism.