P
Patrick
I have a situation in where I have a table with a primary key that can be
altered (in very rare occasions, but still have to deal with it) and the
change is cascaded in SQL Server to many other child tables.
The problem is that this does not work in conjunction with datasets.
When I first update the master table, the update of the child tables will
fail as the key of the child tables has been altered by the cascade and the
update command still uses the original key from the original row data in the
dataset.
When I first update the child tables, these will fail as the master table
does not yet contain the new key and thus this results in a foreign key
violation.
Has anyone dealt successfully with this problem?
Thanks,
Patrick
altered (in very rare occasions, but still have to deal with it) and the
change is cascaded in SQL Server to many other child tables.
The problem is that this does not work in conjunction with datasets.
When I first update the master table, the update of the child tables will
fail as the key of the child tables has been altered by the cascade and the
update command still uses the original key from the original row data in the
dataset.
When I first update the child tables, these will fail as the master table
does not yet contain the new key and thus this results in a foreign key
violation.
Has anyone dealt successfully with this problem?
Thanks,
Patrick