title: How to display specific database entries into a textbox on a WinForm application
body: <p>UPDATE:
  Thanks everyone, the code was not the issue, although the information regarding SQL injection was useful, my issue was that I was using an older version of my database which did not have the corresponding product ID so it was instead using the first product that it could find. Feel very stupid now but thanks for the suggestions.</p>
  
  <p>I currently have the following code : </p>
  
  <pre><code>SqlConnection connection = new SqlConnection(@"Data Source=(LocalDB)\v11.0 AttachDbFilename=C:\Users\h8005267\Desktop\Practical Project\Build\System4\System\StockControl.mdf;Integrated Security=True;Connect Timeout=30");
  connection.Open();
  SqlCommand cmd = new SqlCommand("SELECT * FROM Product WHERE ProductID='" + textBox3.Text + "'", connection); 
  SqlDataReader re = cmd.ExecuteReader();
  
  if (re.Read())
  {
    textBox4.Text = re["ProductTitle"].ToString(); // only fills using first product in table
    textBox5.Text = re["ProductPublisherArtist"].ToString();
    comboBox1.Text = re["ProductType"].ToString();
    textBox6.Text = re["Price"].ToString();
  }
  else
  {
    MessageBox.Show("Please enter a valid item barcode");
  }
  re.Close();
  connection.Close();
  </code></pre>
  
  <p>The issue I am currently having is although the text boxes display the information on button click, the information displayed is only the first row of data in the database, NOT the row corresponding to the textbox3 in the sql statement</p>