title: C# Code Not Executing
body: <p>I have a C#/WPF application with a tabbed interface that has been behaving strangely. After thinking originally my problems were related to the TabControl, I now believe that it's something different and I'm completely stuck. The following method is just supposed to pull some data out of the database and load a couple of WPF ComboBoxes. The strange thing is that the code reaches a certain point, specifically the end of the loop that loads cboState's Item collection, and then continues on. No code placed below that loop executes, no errors are thrown than I can find or see, and no breakpoints placed below that loop ever get reached. I'm completely perplexed.</p>
  
  <pre><code>private void loadNewProjectTab() {
      dpDate.SelectedDate = DateTime.Now;
  
      cboProjectType.Items.Add("Proposal");
      cboProjectType.Items.Add("Pilot");
      cboProjectType.SelectedIndex = -1;
  
      string sql = "SELECT State FROM States ORDER BY ID";
      OleDbCommand cmd = new OleDbCommand(sql, connection);
      if(connection.State == ConnectionState.Closed) {
          connection.Open();
      }
  
      OleDbDataReader reader = cmd.ExecuteReader();
      while(reader.HasRows) {
          reader.Read();
          cboState.Items.Add(reader["State"].ToString().Trim());
      } // &lt;-- Nothing below here executes.
  
      connection.Close();
  }
  </code></pre>