J
Jens Weiermann
Hi!
I have a rather simple DataSet with two tables in it (parent / child). I've
set the UpdateRule property of the relation to "Cascade", because this
value is changed when the parent row is written to the sql server (an
identity column); so after I call the Update method of the DataAdapter for
the parent table, the new key values are reflected in the child table
before I finally call the Update method of the DataAdapter for the child
table. So far, so good.
However, I'm experiencing strange problems when Deleting a record from the
child table after it has been inserted. I can see using Sql profiler that
wrong key values are written to the database (causing the update to fail).
Strangely, the DiffGram written to disk just before the Update looks good.
Even more strangely, it works fine when Clear()ing the DataSet and loading
it again from the (just saved) DiffGram.
Anybody have a clue what might happen here?
Thanks!
Jens
I have a rather simple DataSet with two tables in it (parent / child). I've
set the UpdateRule property of the relation to "Cascade", because this
value is changed when the parent row is written to the sql server (an
identity column); so after I call the Update method of the DataAdapter for
the parent table, the new key values are reflected in the child table
before I finally call the Update method of the DataAdapter for the child
table. So far, so good.
However, I'm experiencing strange problems when Deleting a record from the
child table after it has been inserted. I can see using Sql profiler that
wrong key values are written to the database (causing the update to fail).
Strangely, the DiffGram written to disk just before the Update looks good.
Even more strangely, it works fine when Clear()ing the DataSet and loading
it again from the (just saved) DiffGram.
Anybody have a clue what might happen here?
Thanks!
Jens