Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Many to Many Insert with OpenXML

Status
Not open for further replies.

mbde

Programmer
Mar 14, 2005
55
US
The Xml Structure looks like such

<A>
<d1></d1>
<d2></d2>
<B-Collection>
<B>
<d3>
<d4>
<C-Collection>
<C>
<d5>
</C>
<C>
<d6>
</C>
</C-Collection>
</B>
<B>
<d7>
<d8>
<C-Collection>
<C>
<d9>
</C>
<C>
<d10>
</C>
</C-Collection>
</B>

So there is one A Node but many B Records which have many C children records

Table B has an Identity on it and that Identity is stored as a foreign key in table C

Using OpenXML how can I insert 4 B records, get each of there identities back, and then insert the associated C records with the B identities.

I would like to avoid using cursors if at all possible.


Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top