SqlConnection conn= NewSqlConnection ();
Conn. ConnectionString= "Server = 127.0.0.1; User ID = sa; Password = fdahgdrethj31313210212121; Database = northwind; Persist Security Info = True";
Conn. Open ();
SqlDataAdapter da= NewSqlDataAdapter ("Select * from table", Conn );
SqlCommandBuilder thisBulder= NewSqlCommandBuilder (da );
DataSet ds= NewDataSet ();
Da. Fill (ds );
Ds. WriteXml (@"C: emp. xml");
========================================================== ============================================== Private VoidWriteXmlToFile (DataSet thisDataSet){
If(ThisDataSet= Null){Return;}
//Create a file name to write.
StringFilename= "MyXmlDoc. xml";
//Create the FileStream to write.
System. IO. FileStream myFileStream= NewSystem. IO. FileStream
(Filename, System. IO. FileMode. Create );
//Create an XmlTextWriter with the fileStream.
System. Xml. XmlTextWriter myXmlWriter=
NewS