G
Guest
I've got a dataset with with 2 datatables in it. We'll call them the Objects
table and the Assignments table. The primary keys for both tables are
autoincrement fields. I need to write a record to the Objects table, then
write another record to the Assignments table that has a reference to the
record added to the Objects table. I then call SqlDataAdapter.update on the
Objects table, then the Assignments table. The problem is when I look at the
records that were written, the relationship is broken. The Objects record
has a different ID than the original one I wrote to the datatable, thus
breaking the relationship. How do I keep my relationships intact?
table and the Assignments table. The primary keys for both tables are
autoincrement fields. I need to write a record to the Objects table, then
write another record to the Assignments table that has a reference to the
record added to the Objects table. I then call SqlDataAdapter.update on the
Objects table, then the Assignments table. The problem is when I look at the
records that were written, the relationship is broken. The Objects record
has a different ID than the original one I wrote to the datatable, thus
breaking the relationship. How do I keep my relationships intact?