Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interger Data type as a surrogate key?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00087896
Message ID:
00087897
Vues:
35
>I've been using the numeric data type (N,n,0) as a surrogate primary key in parent-child relationships with no problems. Yesterday, I tried using the 4 byte Integer Data type in the same roll and ran into a consistant show stopper. The TABLEUPDATE command always failed with a "Uniquness Violated" error on the parent table. However, after the refresh command was issued the new record would show in the grid, and child records could be added! However, attempts to move off of the row would trigger the RI code allowing on the REVERT option, which rolled back (?) the change. Cascade delete will then kill off the child record. >Anyone run into this?

I forgot to add that the PK was indeed unique. All of the primary keys in the table were visible in the grid, so there is no doubt about this. Thinking there might be a problem with deleted keys I kept SET DELETE ON, and too be absolutely sure I packed the tables. Still no joy.
Nebraska Dept of Revenue
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform