F
Frank Hauptlorenz
Dear all,
I have a problem with updating (to keep it simple to explain) 2 tables
which are related.
Table one contains parts and table two contains their relations. Table
two has foreign keys to the parts.
The parts are auto generated and get negative numbers within the
application.
Now comes the UpdateAll() of the TableAdapterManager which also tries to
update the tables within the correct order:
first it inserts the parts in table one which is working but then it
tries to insert into table 2 which breaks, because of a foreign key
violation.
It seems to me that the new part ID's are not forwarded to table two, so
the TableAdapterManager tries to insert the wrong part Id's.
How can this be managed?
Thanks for responding!
Frank
I have a problem with updating (to keep it simple to explain) 2 tables
which are related.
Table one contains parts and table two contains their relations. Table
two has foreign keys to the parts.
The parts are auto generated and get negative numbers within the
application.
Now comes the UpdateAll() of the TableAdapterManager which also tries to
update the tables within the correct order:
first it inserts the parts in table one which is working but then it
tries to insert into table 2 which breaks, because of a foreign key
violation.
It seems to me that the new part ID's are not forwarded to table two, so
the TableAdapterManager tries to insert the wrong part Id's.
How can this be managed?
Thanks for responding!
Frank