插入完,返回一个xml结果,程序得到这个字符串,写文件。

解决方案 »

  1.   

    OleDb
    http://www.winu.cn/space-14160-do-blog-id-12799.html
      

  2.   

    参考XmlDocument doc = new XmlDocument();
        doc.LoadXml("<book genre='novel' ISBN='1-861001-57-5'>" +
                    "<title>Pride And Prejudice</title>" +
                    "</book>");    XmlNode root = doc.DocumentElement;    //Create a new node.
        XmlElement elem = doc.CreateElement("price");
        elem.InnerText="19.95";    //Add the node to the document.
        root.AppendChild(elem);    Console.WriteLine("Display the modified XML...");
        doc.Save(Console.Out);
      

  3.   

    string sql = "insert into xxx(...) values(" + a + ", " + b + "...)"//执行sql语句。
    ...//生成xml
    string xml = "<?xml verstion=\"1.0\"?><root><a>" + a + "</a><b>" + b + "</b></root>";
    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
    doc.LoadXml(xml);
    doc.Save(Request.MapPath("test.xml"));
      

  4.   

    正确,用dom技术
    可以实现
    自己试试