将DataTable中的一行复制到另一个DataTable的方法
时间:
2016-01-30 11:13:31
阅读:
148
评论:
收藏:
0
[点我收藏+]
将DataTable中的一行复制到另一个DataTable
方法1:
DataRow dr = ds2.Tables[0].NewRow();
dr.ItemArray = ds1.Tables[0].Rows[i].ItemArray;
ds2.Tables[0].Rows.Add( dr );
方法2:
ds2.Tables[0].ImportRow(ds1.Tables[0].Rows[i]);
将DataTable中的一行复制到另一个DataTable的方法
原文:http://www.jb51.net/article/11320.htm