Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default unique ID values for a field in a remote table ?
Message
 
À
02/06/1998 12:25:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00103696
Message ID:
00104066
Vues:
44
Hi Andrea,

>This is music for my ears !! Thank-you !
>So, in a few words, why would you prefer to call NewId() from code rather than from the table ?

I think it makes sense when calling NewId() from code in Ed's case... especially as he is not using surrogate keys.

If you are using surrogate keys then the Id's would be skipped if the NewId() function is specified as the default value in the table. Though there is a workaround in this case too but it is more suitable for Candidate Keys. You could setup the default value as NewCandidateId() in the table and make this field Non-Updatable in the view. This way adding records in the view will not skip the Id's. This is less suitable for primary keys because you might require the actual value.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform