string xmlString = string.Empty;
SqlConnection cn = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand(stringName, cn);
SqlDataReader dr;
cmd.ExecuteNonQuery();
xmlString += " " ;
xmlString += "";
while (dr.Read())
{
xmlString += "";
xmlString += dr[0].ToString();
xmlString += " ";
xmlString += dr[1].ToString();
xmlString += " ";
}
xmlString += " ";
StreamWriter streamWriter = File.CreateText("D:\ampl.xml");
streamWriter.WriteLine(xmlString);
streamWriter.Close();
Wednesday, March 17, 2010
reating XML file using StreamWriter
-
Creating data driven application is one of the most commonly done task in our day today application development. In these applications, ...
-
The following article discusses the WPF command binding feature with relation to Mouse clicks. One of WPF powerful features is the bindin...
-
Languages of the real and artificial. Web MVC The Model-View-Controller (MVC) architecture is a standard architecture for interact...