This is my position:
I'm just a simple end user using VFP.
I don't care what rulers, theory to follow regarding primary key, candidate
key, etc.... so long as my program works as I wish.
My way:
1. I always "set deleted on", I always disgard deleted records. Sometimes
reindex to free space.
2. I set e.g. clientCode, as primary key, the index filter expr is
"!DELETED()"
3. It works...and I am happy!
I am happy because:
1. Someone create a new clientCode, its okay,
2. Someone create a duplicate clientCode, the database engine will reject
this.
3. The client record is deleted, its gone.
4. Someone re-use the clientCode again as new record, it is accepted!
5. What else should I ask for?
(except that I cannot create "a primary key with filter expr by
coding", I must use GUI)
Tonie.
Quote:> I have the following question.
> By which way, someone can delete records in a database table with a
primary
> key and that record to be totally ignored?
> This hasn't to do with the 'Set Deleted On' or it shouldn't have to do
with
> the 'Set Deleted On'.
> You must always turn OFF and ON the Deleted Records in order to genarate
a
> new key.
> And what if we delete a record and want to insert a new one with the same
> 'key' code? This is not allowed unless you pack the database.
> Any solutions?
> Thanks
> Demetrios Panayotakopoulos