In the following code, which is used to get a list of products on a specific line, the command returns results only when I hard-code (concatenate) productLinein SQL. Parameter substitution never occurs.
+ "lineName = '@productLine' "
+ "and isVisible = 1 ";
MySqlDataAdapter adap = new MySqlDataAdapter(sql, msc);
adap.SelectCommand.Parameters.Add("@productLine", productLine);
Profk source
share