title: inserting multiple values from C# into one row in a SQL table
body: <p>I have a table which i want to store all the outputs into one row seperated by a space(eg "textbox1 textbox2 textbox3". How would i do this? At the moment its trying to put them into different columns. Giving me an error stating im using fewer columns.</p>
  
  <pre><code>            }
              using (SqlCommand cmd = new SqlCommand("INSERT INTO [user] (solution) VALUES (@textbox1, @textbox2, @textbox3)", cn))
              {
                  cmd.Parameters.AddWithValue("@textbox1", textBox1.Text);
                  cmd.Parameters.AddWithValue("@textbox2", textBox2.Text);
                  cmd.Parameters.AddWithValue("@textbox3", textBox3.Text);
                  cmd.ExecuteNonQuery(); // or int affected = cmd.ExecuteNonQuery() 
                  MessageBox.Show("Success!");
  
              }
          }
  </code></pre>