Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
<pre lang="msil">import from xml to two table with foreign key pointing to identity primary key problemQuestion:
I have two tables user (id, name,etc.) and userassociation(userid, orgid, etc.)
User(id) is a primary key with identity set to yes
userassociation (userid) is foreign key referencing user(id)

I have several small xml files each has information about a single user and userassociation.

I am using dataflow task and xml source to import the populate the two tables
How can I retrieve the identity after importing a row to the user table to use it to add a row to the userassociation</pre>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900