title: Store values in the Access Database
body: <p>I basically want to store some values into the database.<br/>
  I keep getting the error <code>"Number of query values and destination fields are not the same."</code> 
  pointing towards the  <code>dr = cmd.ExecuteReader();</code> <br><br/>
  Can someone please help me? :) <br/>
  I am kinda new to the whole thing and don't really know whats happening. 
  <br/>Bellow is the code am using.</p>
  
  <pre><code>public partial class Registeration_experiment : System.Web.UI.Page
  {
      static OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\New folder\Project 1.0\WebSite1\New Microsoft Office Access 2007 Database.accdb");
      OleDbDataAdapter ada = new OleDbDataAdapter();
      OleDbCommand cmd = new OleDbCommand();
      OleDbDataReader dr;
  
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  
      protected void Button1_Click(object sender, EventArgs e)
      {
          string str = "insert into Registeration_Test (Name1, address, emailaddress)" +
            "values (?, ?, ?)";
          con.Open();
          cmd = new OleDbCommand(str, con);
          cmd.Parameters.AddWithValue("@p1", TextBox1.Text);
          cmd.Parameters.AddWithValue("@p2", TextBox2.Text);
          cmd.Parameters.AddWithValue("@p4", TextBox4.Text);
          cmd.ExecuteNonQuery(); 
      }
  }
  </code></pre>
  
  <p>Thank you :)</p>