好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

将DataTable中的一行复制到另一个DataTable的方法

将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的方法的详细内容...

  阅读:92次