Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have one XSD file and i want to generate file in XML format.

i am following this approach mention below:-

=> Create dataset from the xsd file.
=> Dataset will have tables say table1,table2,table3,table4,table5,table6 ,table7 ,table8, table9
=> You have the main data in Maintable with assume 50 columns.
=> From MainTable pick columns , create a view and copy data to respective table in Dataset ex: column1 , column2 from MainTable to Table1 of Dataset.
=> Proceed similarly and fill the dataset with all values from MainTable.
=> Now finally Dataset is ready.
=> From Dataset using WriteXML you can create XML file , which is 2 lines of code.


But, i am not able to insert the values for primary Key column and Foriegn Key Column.
I m Getting an Error:_
ForeignKeyConstraint Loans_Loan requires the child key values (1) to exist in the parent table.

Any idea how go with the approach and get the output file in xml format.

Thanks in advance ...
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