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

[C#, ASP.Net]

I have a Dataset containing multiple tables. The tables are dynamically and randomly added into the dataset. If i create xml using ds.GetXml(), all the tables are converted as xml.

I need to make one of the Data Table as a First table in that xml. For eg: if i have 3 tables Addr_det, Cust_det and Cust_Income. I added these tables randomly in to the dataset [Addr_det, Cust_Income and Cust_det]. Now i need the Cust_det table should be a first table in that dataset (or xml).

Please help me....

Thanks in Advance.
Posted
Updated 28-Jun-10 3:08am
v2
Comments
Sandeep Mewara 28-Jun-10 9:23am    
Why not change the order in the dataset itself?

I guess you have to create another DataSet and copy tables from old DataSet to the new one in required order.

I am not sure if there is a better way for this. I will keep a watch too.
 
Share this answer
 
Instead of creating another copy of Dataset, you can sort the tables in xml using XQuery. This will be performance wise more faster than dataset.
 
Share this answer
 
Comments
Ema112 25-Jan-17 10:06am    
How to do the above??

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