How to generate a xml file for a table in sql server using Linq to sql help me--------
hi give me replay plz
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Mar 18, 2011, 4:52 AM EDT
Try this easy way.
SqlDataAdapter cmd = new SqlDataAdapter("select * from " + tab, con);
DataSet ds = new DataSet();
cmd.Fill(ds,tab);
ds.WriteXml("c:\\DB\\" + tab +".xml", XmlWriteMode.WriteSchema);