title: i want to create a user form that can buy multiple products
body: <p>I am trying to create a market program that can be used by users to buy items. I have written the following code but it is giving me a problem which I am not able to fix. If anyone could help me I would really appreciate it. </p>
  
  <p>The code has the following functionality: (see <a href="https://i.stack.imgur.com/PIKZp.png" rel="nofollow noreferrer">pic</a>)
  the user buys a product and this information is saved in a table of a database. </p>
  
  <p>But there is a problem: (see <a href="https://i.stack.imgur.com/UcYiA.png" rel="nofollow noreferrer">database pic</a>)
  information about the purchase is not saved in the user field but another field is created. </p>
  
  <p>Can anybody please help me?</p>
  
  <pre><code> private void User_Load(object sender, EventArgs e)
      {
  
              conect.Open();
              OleDbCommand command = new OleDbCommand();
              command.Connection = conect;
              command.CommandText = "select * from Item ";
  
              OleDbDataReader reader = command.ExecuteReader();
              while (reader.Read())
              {
                  combo.Items.Add(reader["Item_Name"].ToString());
  
              }
              conect.Close();
  
  
      }
  
      private void combo_SelectedIndexChanged(object sender, EventArgs e)
      {
  
  
  
              OleDbCommand command = new OleDbCommand();
              command.Connection = conect;
              command.CommandText = "select * from Item where Item_Name='"+combo.Text+"'";
              conect.Open();
              OleDbDataReader reader = command.ExecuteReader();
              while (reader.Read())
              {
  
                  item_id.Text = reader["Item_ID"].ToString();
  
                  Price.Text = reader["Item_Price"].ToString();
  
  
  
              }
              conect.Close();
  
  
      }
  
  
  
  
      private void Buy_Click(object sender, EventArgs e)
      {
  
              conect.Open();
              OleDbCommand command = new OleDbCommand();
              command.Connection = conect;
                  command.CommandText = "insert into Sign_Up ([Item_Name],[Price]) values ('" + combo.Text + "','" + Price.Text + "')";
  
          if (combo.Text == "")
          {
              MessageBox.Show("Please Chose An Item");
  
          }
          else
          {
              MessageBox.Show("Success");
              command.ExecuteNonQuery();
              conect.Close();
          }
  
  
  
  
      }
  </code></pre>