For loop error checking
<p>Everything works, the one thing that is not working is it is making a note for every single account even if nothing was done/found for that account.</p>

<pre><code>for (int j = 0; j &lt; accounts.Length; j++)
        {
            SqlConnection connection = new SqlConnection(SqlDataSource1.ConnectionString);

            SqlCommand SqlComm = new SqlCommand("insert into TableHistory (id, startDate, dueDate, userid, amount, number, needsReview, offer, dateAdded, dateRejected, rejectedBy) " +
                       "select (select max(id) + 1 from Table1), startDate, dueDate, userid, amount, number, needsReview, offer, dateAdded, GETDATE(), @userID from Table1 where number = @number " +
                       "delete from Table1 where number = @number", connection);
            SqlComm.Parameters.Add("@number", SqlDbType.Int).Value = Convert.ToInt32(accounts[j].ToString());
            SqlComm.Parameters.Add("@userID", SqlDbType.Int).Value = userID;

            connection.Open();

            SqlComm.ExecuteNonQuery();

            connection.Close();

            NoteAccount note = new NoteAccount("Personal Note", accounts[j].ToString(), userID);
            note.makeNote();
        }
</code></pre>

<p>Lets say Account 11 does not have anything in <code>Table1</code>.  Nothing will fail, because the insert statement won't fire because the select statement returns nothing from <code>Table1</code>, this is fine.</p>

<p>But the <code>note.makeNote();</code> fires and adds a "personal" note to the account when doesn't need to be added.  Is there an easy way to only add the note if the account exists in <code>Table1</code>?</p>
