DataSet to XML & from XML to Databse
-
Hi friends, iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa Thanx
-
Hi friends, iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa Thanx
Try looking at the Database articles here on CodeProject Also there is probably an example of doing exactly that as part of the MSDN documentation. You can probably find it searching with Google and putting MSDN as the first key word in your search phrase.
led mike
-
Hi friends, iam new to .Net Technology,i want some help reg--the task is that ,how can i save the data to XML file and from there to Database and vice versa Thanx
You can try this:
DataSet ds = GetMyDataset(); // imaginary function - substitute your dataset retrieval code here
XmlTextWriter xmlFile = new XmlTextWriter (@"C:\TEST.XML", null);
XmlDataDocument xmlDoc = new XmlDataDocument(ds);
xmlDoc.WriteContentTo(xmlFile);
xmlFile.Close();The code above should take a dataset and write it to a XML file.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001