Hi,

Assume the following two tables ...
Order_Header
OH_ID Numeric Identity
OH_Cust varchar(20) not null

Order_Lines
OH_ID Numeric (FK on Order_Header)
OL_Line int not null (incremental)
OL_Qty decimal(9,2) not null

These tables are mapped to a typed dataset where the properties for
Order_Header.OH_ID are set to AutoIncrement=True, AutoIncrementSeed=-1 and
AutoIncrementStep=-1.

These datatables are populated using grids and all works well. When I'm
ready to update the DB I call the UpdateDataset(myOrdersDS, "Order_Header",
insert_stmt, update_stmt, delete_stmt, UpdateBehaviour.Standard).

Now my problems start ... I've updated an identity field in the DB and need
to use this to maintain my relationship with the Order_Lines table. How is
this achieved?? If I re-read the updated data back into my Order_Header
DataTable then I will break the relationship, on the other hand, if I don't
know what the new value of OH_ID is how can I update the Order_Lines table?

Perhaps I've gone down the wrong route with this and I would be grateful for
any solutions or suggestions from the group.

Thanks,

Paul