relationship in typed dataset (VS2005)

G

Guest

we have a typed dataset with 2 tables - parent and child with relation and
foreign key constraint.

after adding 1 parent row to the parent table with 1 related(!) child row to
the child table we have the following problem that never occured in VS2003:
both new rows states (each one in it's table) is "added", but after adding
the parent row to the parent table, it automatically changes the state of the
new child row to "modified" instead of added, apparently due to the relation
that changed the foreign key(?).

again, in VS2003 all this worked fine. the only difference that we saw
between 2003 and 2005 is the update rule, delete rule etc, that were
"(default)" in 2003 and now they are "Cascade" because the value "(defualt)"
doesn't exist anymore.
we also tried to change them to any of the other options but the only thing
we managed to achieve is that the child row state will remain "Added" but the
foreign key value won't be updated in this row after the parent row was
inserted.

Quick solution will be very appreciated.

Thanks in advane.
 
L

Luke Zhang [MSFT]

Hello,

I am not very clear about what you said about:

but after adding the parent row to the parent table, it automatically
changes the state of the new child row to "modified" instead of added,
apparently due to the relation that changed the foreign key(?).

It means add the parent row seperately? Or add after child row? Can you
explain this in details?

Thanks,

Luke Zhang
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top