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