>Hi Hilmar,
>
>>I am no expert in CodeMine, but recycling records through a view seems very problematic, in general. I would suggest you forget about it, and PACK your tables once a month.<
>
>I don't think there is a way to easily recycle deleted records with the view in CodeMine. However, the problem I am having is not with table gloat due to deletions, but rather just the occasional duplicate PrimaryKey problem (even though its a Primary index key).
>
>Mel Cummings
OK, I see.
My first option would be to assign primary keys automatically (sequential numbers, or GUID, for example), separate from fields which the user uses.
If this is not practical, a second option is to filter the index on the primary key, on NOT DELETED().
In this case, you might require an additional, regular, filter on the same field, for R.Optimization.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)