Adding a Row to a DataTable question
<p>Greetings everyone-</p>

<p>In my code below I'm trying to add a Row from an existing DataTable (dtResult) into a new DataTable (dtCopyResult) if email address does not match.  So I guess my knowledge of ADO.NET is not up to par because whenever I try to run my below code, I get an "This Row already belongs to another table".  Please let me know how I can fix this..</p>

<p>Many Thanks</p>

<pre><code> if (checkBox1.Checked)  
                    {

                        for (int i = dtResult.Rows.Count - 1; i &gt;= 0; i--)  //dtResult is a DataTable
                        {
                            foreach (object email in emails)  //emails is an ArrayList of email addresses
                            {
                                if (email.ToString().ToUpper() != dtResult.Rows[i][3].ToString().ToUpper())
                                {
                                    dtCopyResult.Rows.Add(dtResult.Rows[i]);  //dtCopyResult is a new blank DataTable that I'm trying to add rows to
                                }
                            }

                        }

                    }
</code></pre>
