Nages,
Now DBFCDX provides *safe* autoinc field by specifying field type as '+' instead of 'N'
Wow, that's news to me. This is a great feature. Is the value inserted numeric or string? I always use a string for easy formatting.
Why did you star "safe?"
I wrote a database sub-class to add auto-incrementing. Maybe now I won't need it.
Why would you need a unique primary key for a one-to-many table?
One-to-many tables are usually contain non-unique values in both fields. For instance let's say you have a customer file and you want to have six phone numbers available. You could add six phone number fields, but most of them would remain empty. And as soon as you run into a situation where a customer has 7 phones then you have to restructure the customer file.
If you use a one-to-many relationship, you create a file with two fields, custno, and phone. You can have an unlimited number of phones for each customer.
CUSTNO, PHONE
01111, 124-9999
01111, 124-9995
01112, 678-0000
In this example the phone number field contains unique numbers, but only because the phone system requires it. If the field contained, say, computers owned by make and model, then they could be non-unique.
Certainly you could add a primary key field, but I have never needed one. Or, maybe I'm not understanding what you are saying?
James