创建一个表,设计表结构,填写表内容

View Code
 DataTable mytable = new DataTable();
DataColumn dc = mytable.Columns.Add("dcDocContent", Type.GetType("System.String"));
DataColumn dc2 = mytable.Columns.Add("dcDocPath", Type.GetType("System.String"));
DataRow ro = mytable.NewRow();
ro["dcDocContent"] = "找不到商城编号";
ro["dcDocPath"] = NAME;
mytable.Rows.Add(ro);
return mytable;

 

你可能感兴趣的:(表结构)