Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Surrogate keys with SQL Server 7.0
Message
From
29/07/1999 10:27:47
 
 
To
29/07/1999 09:46:43
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00247645
Message ID:
00247664
Views:
14
Ken,

I've used both approachs with success. For any situation where you don't need to know the value of the PK after the row has been inserted, Identity value work very well. For tables that are act as parents for a relationship, I like to prefetch the PK.

-Mike

>Hi,
>
>What seems to be the consensus on how to use surrogate keys with SQL Server and VFP remote views?
>
>I know the @@identity thing is avaialble for SQL Identity columns, but that is problematic with table buffering and multiple row inserts. Seems to me you'd have to loop and update all the records one at a time to get each individual key. But maybe that's the way to go.
>
>Is anyone using a Fox- style 'keys' table approach with SQL Server? Any particualr reasons not to do this? Any better ideas? Seems to me the Identity column is kind of the cool neato thing, and I'm feeling like I must use it, but it may not be best.
>
>Also, I know John K. has a different approach altogether with separate read and write connections. (thanks John!) Maybe this is best?
>
>Just diving into this, so any help is greatly appreciated.
>
>Thanks,
>Ken
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform