none
Adding a newRow in a many-to-many scenario. RRS feed

  • Question

  • Hi,
    sorry for bothering, but
    I'm only a beginner and this ADO.NET seems so difficult and strange to me...

    I have a many to many relation: let's say tables A and C and a look up table B.
    A and C tables both have a one-to-many relationship with B.

    I'm using tableadapters (and bindingsources) and I can't figure out how to add a new record (ie, 3 records, at least: one for each table).
    I understand that in a one-to-many relation you have to save the new record in the parent table first, and then all the records in the child table.
    I imagine that it should be the same in the m-m case: save parent tables first and than the lookup table: but I maneged to do this using bindingsource (otherwise, using tableadapter would require retrieving the identity of the row added in the parent table and that's too difficult for me) in the 1-m case, but not in the m-m case.

    Is there a simple way to save new rows in a m-m relation using databindings?

    Thank you - Francesco
    Saturday, August 11, 2007 10:12 PM