解决方案一、参考、;http://blog.163.com/zhug_1970/blog/static/42983053201057525519/

1.先Clone你的DataTable 
    DataTable   rtnTbl   =     aDt.Clone()   ; 
2.复制数据 
    //复制 
    foreach(   DataRow   r   in   aDt) 
    { 
       object   []arr   =   r.ItemArray   ; 
       rtnTbl.Rows.Add(arr); 
    } 
3.加到新的DataSet 
  一个DataTable只能属于一个DataSet 


解决方法二、参考:http://blog.csdn.net/lidaasky/article/details/7196500

对需要添加的datatabele进行复制后再添加。 

dim sqldt as new sqldatatabel

sqldt=dt.copy

ds.Tables.Add(sqldt)

相关文章:

  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案