title: Error in database update query
body: <p>My system won't update, and it's showing this error, I don't know what to do. Any suggestions? Here's my code</p>
  
  <pre><code> private void btnupdate_Click(object sender, EventArgs e)
      {
          com.Connection = con;
          con.Open();
  
  
         string query = "UPDATE [Promissory] SET [pdate] = ?,[Edpno] = ?, [gradingperiod] = ?, [pamount] = ?, [reasons] = ?, [syid] = ? WHERE Promissoryno = ?";
  
          var accessUpdateCommand = new OleDbCommand(query, con);
          accessUpdateCommand.Parameters.AddWithValue("pdate", txtdate.Text);
          accessUpdateCommand.Parameters.AddWithValue("Edpno", txtedpno.Text);
          accessUpdateCommand.Parameters.AddWithValue("gradingperiod", txtgradeperiod.Text);
          accessUpdateCommand.Parameters.AddWithValue("pamount", txtamount.Text);
          accessUpdateCommand.Parameters.AddWithValue("reasons", txtreasons.Text);
          accessUpdateCommand.Parameters.AddWithValue("syid", txtsyid.Text);
  
          accessUpdateCommand.Parameters.AddWithValue("Promissoryno", txtpromiseno.Text); // Replace "123" with the variable where your ID is stored. Maybe row[0] ?
          da.UpdateCommand = accessUpdateCommand; //This line here is the error
          da.UpdateCommand.ExecuteNonQuery();
  
  
          con.Close();
  }
  </code></pre>