View Single Post
Join Date: Jan 2008
Posts: 56
Reputation: Tekito is an unknown quantity at this point 
Solved Threads: 0
Tekito Tekito is offline Offline
Junior Poster in Training

Datasets and SQLServer keys

 
0
  #1
Jan 5th, 2009
I'm new to datasets, and trying to update a SQL Server database with one. I'm having trouble understanding how to correctly write the dataset info to the server db and preserve the relationship keys.

When I write to the main table in the server database, it will assign the new entry a new ID for the primary key. But as I am writing to several child tables as well (that have a field that references the main ID), how do I make sure I record the correct ID for these tables? After all, I do not know the ID until the server gives it to me.
Reply With Quote