SqlConnection sqlconn = new SqlConnection("Server=T-YOUNGF1\\SQLEXPRESS;Database=pubs;uid=sa;pwd=*");
SqlDataAdapter sda = new SqlDataAdapter();
SqlCommand sqlcmd = new SqlCommand("select * from test", sqlconn);
sda.SelectCommand = sqlcmd;
DataSet ds = new DataSet();
sda.Fill(ds, "test");
ds.WriteXml("c:/aa.xml");
XmlDocument xdoc = new XmlDocument();
xdoc.LoadXml(ds.GetXml());
xdoc.Save("c:/data11.xml");
25 December, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment