I am using vb.internet 2008. And i'm using ADO Update to Place new data. So I've got a Dataset with two tables Body a parent or gaurdian and something a young child. When adding new Parent and several child data around the client side, after which Placing it in to the DB (using TableAdapter.Update), so how exactly does the kid obtain the new Parent ID?

If you work with SQL Server you will need to consider using among the following:

  • Scope_Identity

Additionally for this I believe your best choice is to possess a saved method that accepts parent and child information. After you have placed parents Item you will get it's Identity and employ it when placing the kid records.

Another option is to interrupt these into two separate card inserts, one for that parent that returns the mother and father Identity and something for him or her which use that Identity.