Click here to Skip to main content
15,663,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Guys,

I have a XML Document which contains multiple tables. i unable to read it in a dataset(i am able to read xml document which contains single table)

Exception Error Message:
Cannot add constraint to DataTable 'srgbClr' which is a child table in two nested relations. 

Please Help me.

Thank You in Advance.
Updated 10-Jun-18 23:59pm
Member 12202638 11-Jun-18 6:00am    
Have u got solution yet.

Try to read line this, this may solve your problem

DataSet ds = new DataSet();

ds.ReadXml("c:\\test.xml", XmlReadMode.IgnoreSchema);
Share this answer
Refer this article:

Introduction to DataSets and working with XML files[^]

hope it helps :)
Share this answer

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