title: Same record is being inserted multiple times
body: <p>Whenever I insert a record into my database, the record is being added 3 times.</p>
  
  <pre><code>try
  {
     con.Open();
  
     object addedkey = cmd.ExecuteScalar();
  
     if ((addedkey != null &amp;&amp; (addedkey != DBNull.Value)))
     {
        addedkey = Convert.ToInt32(cmd.ExecuteScalar());
     }
  
     added = cmd.ExecuteNonQuery();
  
     lblResult.Text = added.ToString() + " record opgeslagen.";
     lblResult.Text = addedkey.ToString();
  }
  </code></pre>
  
  <p>But when I comment out <code>ExecuteScalar</code> and <code>ExecuteNonQuery</code> everything is working fine. So if I comment out one of the two, the record will be inserted twice.</p>
  
  <p>This started happening after I added a delete button, which has nothing to do with the insert command.</p>
  
  <p>Does anyone know what is causing this?</p>
  
  <p>Thanks in advance. :)</p>