title: what is wrong with my c# update code?
body: <p>i wrote code which has an id,year and status. status is a comb-box which has 4 item and when i try to run this code it keeps telling me like failed due toSyntax error in UPDATE statement, could you give me some idea please???   </p>
  
  <pre><code>private void button3_Click(object sender, EventArgs e)
  {
      try
      {
          conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;" +
              @"Data source= C:\crt_db.accdb";
  
          conn.Open();
          String year = dateTimePicker1.Text.ToString();
          String status = comboBox2.Text.ToString();
          String z =EPID.Text.ToString();
  
          String my_querry = "update crtRenewald set Year='" + year + "',Status='" + status+ "' where EPID=" + z + "";                
          OleDbCommand cmd1 = new OleDbCommand(my_querry, conn);
          cmd1.ExecuteNonQuery();
  
          MessageBox.Show("Status updated");
      }
      catch (Exception ex)
      {
          MessageBox.Show("Failed due to" + ex.Message);
      }
      finally
      {
          conn.Close();
      }
  </code></pre>