Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ASP.NET
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 30 Nov '12 - 1:46


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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 445
1 OriginalGriff 295
2 Arun Vasu 253
3 Zoltán Zörgő 194
4 CPallini 173
0 Sergey Alexandrovich Kryukov 10,105
1 OriginalGriff 7,739
2 CPallini 4,181
3 Rohan Leuva 3,482
4 Maciej Los 2,999


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 30 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid