title: insert value textbox into mysql database
body: <p>I have problems inserting a textboxvalue into a mysql database - there's no errormessage and no inserting. What am I doing wrong</p>
  
  <pre><code> private void RegisterCustomer()
      {
          string firstname = txtfirstname.ToString();
  
          OdbcConnection conn;
          conn = new OdbcConnection(ConfigurationManager.ConnectionStrings["jConnString"].ConnectionString);
          conn.Open();
  
          string sql = "insert into klant (firstname) values (@firstname)";
          OdbcCommand cmd = new OdbcCommand(sql, conn);
          cmd.Parameters.Add("@firstname", OdbcType.VarChar).Value = firstname;
          try
          {
              cmd.ExecuteNonQuery();
          }
          catch (Exception ex)
          {
              Check.Text += ex.ToString() + sql;
          }
          finally
          {
              conn.Close();
              conn.Dispose();
              Check.Text += "OK";
          }
      }
  </code></pre>