title: Incorrect syntax near '=' in c# .net
body: <p>i m trying to update data in database but it is showing an exception that is Incorrect syntax near '='. </p>
  
  <pre><code> SqlCommand cmd = new SqlCommand("upgrade LoginForm set Password ='" + txtConPassword.Text + "' where UserName ='" + txtUser.Text + "' ", conn);
                  var test = cmd.ExecuteNonQuery();
                  if (test == 1)
                  {
                      MessageBox.Show("Password has been reset");
                  }
                  else
                  {
                      MessageBox.Show("Password did not reset");
                  }
              }
              catch (Exception ex)
              {
                  MessageBox.Show("Failed....." + ex.Message);
  
              }
  </code></pre>