title: C# - Selecting SQL Table contents into textbox
body: <p>Trying to get table contents into textBoxes seperately by the prefered ID number when button_click event occours. I've found some videos about the situation but dataGrids were used in those. I'm a complete newbie in C# btw, and i'm not even sure what i'm doing.</p>
  
  <p>Question is, i cant figure how to write a read-only object that is stated below in code into a textBox. I'm %90 sure that it's truly a simple thing, and i'm missing it.</p>
  
  <pre><code>private void button2_Click(object sender, EventArgs e)
  {
      SqlCommand rcmd = new SqlCommand("SELECT ID, Column1, Column2 FROM [TEST].[dbo].[Table_1] where ID=@ID", connection);
      rcmd.Parameters.AddWithValue("@ID", textBox3.Text);
      connection.Open();
      SqlDataReader reader = rcmd.ExecuteReader();
  
      while (reader.Read())
      {
          //textBox4.Text = reader["Column1"];
          //textBox5.Text = reader["Column2"];
          //These wont work, says reader["Column1"] and reader["Column2"] are read-only. What to do?
      }
      connection.Close();
  </code></pre>
  
  <p>Lines with error are intentionally commented. No mistake there. I was trying to figure something else while keeping those in my sight.</p>
  
  <p>Thanks in advance.</p>