title: Why my Update sql Command don't work?
body: <p>i have problems with a sql command in mysql. I have a asp.net applcation and use a mysql database as database. I want to built a class that can insert,update,delete and select the records in the database. I have problems with the update command. In phpmyadmin it works but in my class not :/ </p>
  
  <p>Here is my code</p>
  
  <pre><code>public void UpdateRecord(string title, string firstname, string lastname, string company,
                                 string timefrom, string timeto)
          {
              connection = new MySqlConnection();
  
              try
              {
                  MySqlCommand command = connection.CreateCommand();
  
                  //for testing
                  string sql = "UPDATE 'tb_gast' SET FIRSTNAME='test' WHERE ID=270";
  
                  command.CommandText = sql;
  
                  connection.Open();
  
                  command.ExecuteNonQuery();
  
              }
              catch (Exception)
              {
  
              }
              finally
              {
                  connection.Close();
              }
          }
  </code></pre>
  
  <p>this command work in phpmyadmin</p>
  
  <pre><code>UPDATE `tb_gast` 
  SET 
  FIRSTNAME='uu',
  LASTNAME='uu',
  COMPANY='uu'
  WHERE ID=270
  </code></pre>