Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Index
Message
 
À
07/12/1999 19:18:15
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00300125
Message ID:
00300400
Vues:
30
Steve,

You would be much better served to use surrogate keys, as Craig suggests. Specifcally, having an auto incrementing table to provide the next ID. The reason you get the error is because VFP looks to records that are marked for deletion to ensure the record as a unique value for it's PK. Why?. Because deleted records can be recalled. Some solutions call for building an index filter for not deleted(). This works, but it really bypasses the best solution, use an auto-incrementing surrogate value as your primary key. You will avoid a lot of hassels this way....

>I have a large table. It is indexed with a primary key. The table holds the current location of an engineering drawing in the sign-off cycle. I have a form that points to this table and gives the user the location info. At some point in a given time period the drawing can be released and the next revision level can be issued. My problem comes in when I try to put a new record with a drawing number that already exists. I mark the old record for delete but a pack is not possible until all the users log off. Even though the old record is marked for delete I still get a violation error. Thanks.
>
>God Bless,
>S. Dyke
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform