title: All code after SqlDataReader.ExecuteReader skipped
body: <p>I have the following function:</p>
  
  <pre><code>private void populate()
      {
          String connectionString = Properties.Settings.Default.Database;
  
          String selectString = "select artikelnummer, omschrijving from Artikels";
  
          SqlDataReader reader = null;
  
          SqlConnection connection = new SqlConnection(connectionString);
          SqlCommand command = new SqlCommand(selectString);
  
          reader = command.ExecuteReader();
          connection.Open();
          int x = 0;
          while (reader.Read())
          {
              String item = String.Empty;
              item = Convert.ToString(reader["Artikelnummer"]) + "\t" + Convert.ToString(reader["Omschrijving"]);
              x++;
              listboxGeselecteerd.Items.Add(item);
          }            
      }
  </code></pre>
  
  <p>Everything that follows after <code>reader = command.ExecuteReader();</code> is skipped.</p>
  
  <p>Is there anything I've done wrong?</p>
  
  <p>UPDATE: Moved the <code>connection.Open();</code> to the right spot. Now, when I reach that line, my output shows <code>Step into: Stepping over non-user code 'System.Data.SqlClient.SqlConnection.Open</code></p>
  
  <p>And then skips the rest of the function.</p>