This error is occuring while adding one datatable from a dataset to another .\"DataTable already belongs to another DataSet.\"
dsformulaValues.Tables.Add(m_D
The accepted answer isn't very good. Cloning should always be a last option.
Here's a way around the problem without incurring the overhead of cloning.
DataSet ds = GetData1();
DataSet ds2 = GetData2();
//Assuming you know you've got good data
DataTable dt = ds2.Tables[0];
ds2.Tables.Remove(dt);
dt.TableName = "PortedTable";//you may need to change the table name to prevent conflicts
ds.Tables.Add(dt);