title: Searching for and displaying sql database data C#
body: <p>I am new to coding and am currently doing some work with sql databases. I am supposed to create a database, display all the information in the database in a console application and then search for a specific "customerID" (One of the columns in the database) and display information regarding that customer. </p>
  
  <p>I have been able to create the database and display the information, but I am not sure how I am supposed to display the data in my console application. I can display the top row information, but I can't figure out how to get to the lower rows. The information I have gotten from the one teaching me is not giving me enough to go on.</p>
  
  <p>Please help!</p>
  
  <pre><code>SqlCeConnection con1 = new SqlCeConnection(conStr);
  con1.Open();
  SqlCeCommand cmd1 = new SqlCeCommand("SELECT * FROM shippingTable", con1);
  SqlCeDataReader dr = cmd1.ExecuteReader();
  
  Console.WriteLine("Enter your customer ID (C1, C2 or C3");
  string userValue = Console.ReadLine();
  
  while (dr.Read())
  {
  
      if (userValue == "C1")
          {
              Console.WriteLine(dr[1] + "Your product was shipped: " + dr[5]);
              break;
          }
  
      if (userValue == "C2")
          {
              Console.WriteLine(dr[1] + "Your product was shipped: " + dr[5]);
              break;
          }
      if (userValue == "C3")
          {
              Console.WriteLine(dr[1] + "Your product was shipped: " + dr[5]);
              break;
          }
      else
          {
              Console.WriteLine("Something went wrong, you typed in the wrong customer ID");
              break;
          }
  }
  </code></pre>