title: C# OleDb Exception "No value given for one or more required parameters" while trying to delete from Access database
body: <p>I have a table with "SEMESTER, SUBJECT, OFFER, RESULT" where "SEMESTER" &amp; "SUBJECT" is PRIMARY KEY. When i use the query</p>
  
  <p><code>"DELETE FROM Course_Information WHERE Semester = 1 AND Subject = 'CSE-414' ;</code> </p>
  
  <p>Its working perfectly in access database but i always get exception when i tried to use it in my c# code.</p>
  
  <p>Moreover its works if i use "DELETE FROM Course_Information WHERE Semester = 1 ;</p>
  
  <p>I want to use both "SUBJECT" &amp; "SEMESTER" In the WHERE condition (Because there could be different subject in the same semester)</p>
  
  <p>See my code,</p>
  
  <pre><code>connection_string = aConnection.return_connectionString(connection_string);
              string sql_query = "DELETE FROM Course_Information WHERE Semester = " + this.textBox1.Text + " AND Subject = " + this.textBox2.Text + " ;";
  
              OleDbConnection connect = new OleDbConnection(connection_string);
              OleDbCommand command = new OleDbCommand(sql_query, connect);
              try
              {
                  connect.Open();
                  OleDbDataReader reader = command.ExecuteReader();
                  MessageBox.Show("Delete Successful!");
                  connect.Close();
                  UpdateDatabase();
              }
  
              catch (Exception ex)
              {
                  MessageBox.Show(ex.Message);
              }
  </code></pre>