This error is occuring while adding one datatable from a dataset to another .\"DataTable already belongs to another DataSet.\"
dsformulaValues.Tables.Add(m_D
dtCopy = dataTable.Copy()
ds.Tables.Add(dtCopy)
We can Optimize the code like :
ds.Tables.Add(dataTable.Copy());