>Pascal, this is what I do. I use integer fields for keys. When I want to "delete" a record, I set the key value to the negative of itself.
>
>REPLACE TABLE.iKey with -TABLE.iKey.
>
>This will never cause a non-unique value.
>
>I do this for the primary key and all of the foreign keys. I DON'T actually DELETE the record. I have SET DELETED OFF.
>
>Works for me.
2 comments :
- in this case the mentioned index is not a primary key issue : it's only set up to prevent records with a duplicate key (how can you prevent that 2 users try to add the same keyvalue at exactly the same time)
- I'm always wondering how someone work things out with SET DELETED OFF. Really can't imagine how you handle things elegantly this way ...