title: Deleting data from an MS Access Database with C# via button click
body: <p>I am trying to delete Data from my database via a button click however I am currently getting the error:</p>
  
  <p>"An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll</p>
  
  <p>Additional information: No value given for one or more required parameters."</p>
  
  <p>This is my code for the delete button:</p>
  
  <pre><code>private void btnDelete_Click(object sender, EventArgs e)
      {
          connect.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\Foundation Degree\Year 2\Chris Ovia\Assignment2\Assignment2\BookSellersDatabase.mdb";
          tempTitle = txtTitle.Text;
          connect.Open();
          OleDbCommand cmd = new OleDbCommand("DELETE FROM Book WHERE Title = tempTitle", connect);
          cmd.ExecuteNonQuery();
          MessageBox.Show("Data Deleted", "Deleted", MessageBoxButtons.OK, MessageBoxIcon.Information);
          connect.Close();
  
          //this.Refresh();
          //Application.DoEvents(); 
      }
  </code></pre>