|
| |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
SqlConnection conn = new SqlConnection(); = \"Server=127.0.0.1;User ID=sa;Password=fdahgdrethj31313210212121;Database=northwind;Persist Security Info=True\";![]() = new SqlDataAdapter(\"select * from 表\", conn); = new SqlCommandBuilder(da); = new DataSet();![]() @\"C:/temp.xml\"); private void WriteXmlToFile(DataSet thisDataSet) { if (thisDataSet == null) { return; } // Create a file name to write to. string filename = \"myXmlDoc.xml\"; // Create the FileStream to write with. System.IO.FileStream myFileStream = new System.IO.FileStream![]() // Create an XmlTextWriter with the fileStream. System.Xml.XmlTextWriter myXmlWriter = new System.Xml.XmlTextWriter(myFileStream, System.Text.Encoding.Unicode); // Write to the file with the WriteXml method. thisDataSet.WriteXml(myXmlWriter); ![]() ![]() 返回类别: 教程 上一教程: 利用asp+的独特的底层操作的功能实现对Pop服务器的存取(实现了asp+收pop信件的功能) 下一教程: .NET和SQL Server中“空值”辨析 您可以阅读与"根据数据库生成xml二法"相关的教程: · .NET Remoting 实现分布式数据库查询 · ADO连接数据库字符串大全 · ASP+联结数据库 · 使用ADO.NET轻松操纵数据库 · asp+ 利用数据绑定来处理XML文件 |
| 快精灵印艺坊 版权所有 |
首页 |
||