DataTable errorDataTable= new DataTable();
DataTable UpdateTable;
         DataRow dr;
         int nRows= dt.Rows.Count;
for(int i=0;i<nRows;i++)
        {   
  try
    {
 if (条件)
                    {
                       errorDataTable=dt.Clone();//dt是原表是的即表A,errorDataTable即表B
      dr=errorDataTable.NewRow();
                        dr=dt.Rows[i];   //报错:该行也属于另外一个表.
      errorDataTable.Rows.Add(dr);
 
                     }
  }
catch(Exception exc)
{  
}

}