I'm not sure I understand the response, but I don't think I explained my problem very clearly, so I'll start over:
I am trying to add new entries to the SQL Server database from a dataset. The database has a main table with a primary key as the ID, then several child tables referenced to the main table via this ID.
When I start to add new entries to the database, the first thing I do is add a new entry to the main table. The database will then assign this entry a new ID. To finish the job I have to add some entries to the child tables, but I need to make sure to give these tables the new ID so everything is tied together properly. How do I read this new ID, or otherwise ensure integrity? Are you saying somehow the dataset and database figure this out automatically?