Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to generate PK on SQL table
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00459598
Message ID:
00459774
Views:
27
>Do you create the GUID with a row global unique identifier column in SQL using NewId() as the default value for the field? If so, how do you retrieve the value of this field when a new record is inserted?

I think I would call the NewID() function explicitly. I do not know of a way to get the value back if you use NewID as the default for a column. And I would not think this is much overhead, going to the server twice (calling NewID, then inserting the record).
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform