Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default unique ID values for a field in a remote table ?
Message
 
To
02/06/1998 12:25:55
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00103696
Message ID:
00104066
Views:
42
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform