string str = "Data Source=192.168.1.20;Initial Catalog=WebTest;User ID=sa;Password=";
        SqlConnection conn = new SqlConnection(str);
        string sel = "select * from Table_A";
        SqlDataAdapter da = new SqlDataAdapter(sel, conn);
        DataSet ds = new DataSet();
        da.Fill(ds,"stu");
        XmlDataDocument xdd = new XmlDataDocument(ds);
        string ss = Server.MapPath("stu.xml");
        xdd.Save(Server.MapPath("stu.xml"));

 

相关文章:

  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
  • 2021-05-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-02-23
相关资源
相似解决方案