title: Deleting data from OleDB C#
body: <p>The columns that I have in my DB are <code>[CusName], [CusNo], [CusAdvance], [TotalAmount], [ID]</code> and <code>[CusItem]</code>. I get the input of the name of the Customer to be deleted from <code>textBox4.Text</code>. 
  I have modified the code as per what I got from you guys. But still the entries are not being deleted. They still remain inside the DB.</p>
  
  <p>My Code:</p>
  
  <pre><code>void Button1Click(object sender, EventArgs e)
  {
     try
     {
        OleDbConnection delConn = new 
            OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data 
            Source=C:/NavneethCollection.accdb;Persist Security Info=False;");
        delConn.Open();
        String delQuery = "DELETE FROM NavColl WHERE [CusName]= @CustName";
        OleDbCommand delcmd = new OleDbCommand();
        delcmd.CommandText = delQuery;
        delcmd.Connection = delConn;
        delcmd.Parameters.AddWithValue("@CustName", textBox4.Text);
        delcmd.ExecuteNonQuery();
        MessageBox.Show("Customer has been successfully removed!");
     }
     catch(Exception exc)
     {
        MessageBox.Show("Error: "+exc.Message);
     }
  }
  </code></pre>