title: MySQL select query with parameter
body: <p>I am trying to use MYSQL select query with c#.</p>
  
  <p>Following query for searching "ID" is working fine:</p>
  
  <pre><code>conn = new MySqlConnection(cs);
  conn.Open();
  cmd = conn.CreateCommand();
  cmd.CommandText = "select * from catalog_product_entity where entity_id = ?Id";
  MySqlDataAdapter adp = new MySqlDataAdapter(cmd);
  cmd.Parameters.Add("?Id", SqlDbType.Text).Value = ProductList[i].ProductId.ToString();
  adp.Fill(MagentoProduct);
  </code></pre>
  
  <p>Now, I want to search exact string value in table. I am using following code and its giving empty result: </p>
  
  <p>My Code:</p>
  
  <pre><code>                            conn = new MySqlConnection(cs);
                              conn.Open();
                              cmd = new MySqlCommand("select * from catalog_category_entity_varchar where value = @Value;", conn);
                              cmd.Parameters.AddWithValue("@Value", "Storybooks");
                              MySqlDataReader r = cmd.ExecuteReader();
  
                              while (r.Read())
                              {
                                  log.WriteEntry(r.GetString("value"));
                              }
  </code></pre>