第一个示例方法:
1 SqlConnection conn = new SqlConnection();
2 conn.ConnectionString = "Server=127.0.0.1;User
ID=sa;Password=fdahgdrethj31313210212121;
Database=northwind;Persist Security Info=True";
3 conn.Open();
4 SqlDataAdapter da = new SqlDataAdapter("select * from 表", conn);
5 SqlCommandBuilder thisBulder = new SqlCommandBuilder(da);
6 DataSet ds = new DataSet();
网页教学网
7 da.Fill(ds);
Webjx.Com
8 ds.WriteXml(@"C:emp.xml");
Webjx.Com
第二个示例方法: Webjx.Com...[ 查看全文 ]