title: Use parameters for MySqlCommand query
body: <p>I'm trying to insert into mysql table using this code:</p>
  
  <pre><code>// open connection here
  this.conn.Open();
  
  // fields from post request
  var email = Request.Form["email"];  
  var password = Request.Form["password"];
  
  string sqlInsert = "INSERT INTO mytable(col1, col2) values(?email, ?password)";
  MySqlCommand cmd1 = new MySqlCommand(sqlInsert, this.conn);
  cmd1.Parameters.Add("?email", email);
  cmd1.Parameters.Add("?password", password);
  cmd1.ExecuteNonQuery();
  </code></pre>
  
  <p>here: <code>cmd1.Parameters.Add("?email", email);</code> I am getting  error:</p>
  
  <blockquote>
    <p>cannot convert from 'string' to 'MySql.Data.MySqlClient.mysqlDBType'</p>
  </blockquote>
  
  <p>What I'm doing wrong?</p>