MySql 怪异问题Parameter '?applicantOperator' must be defined
程序里是这样写的:
if (applicantOperator != "")
{
applicantOperatorClause = " AND applicantname like ?applicantOperator ";
}
cmd.Parameters.Add("?Applicantname", applicantOperator);
最后执行时却一直报错 “Parameter '?applicantOperator' must be defined”,经调试 applicantOperator 里面有值。applicantOperator的值是通过combox得到的,等待高人救场啊
------解决方案--------------------
cmd.Parameters.Add("?Applicantname", applicantOperator);
改成:
cmd.Parameters.Add("?applicantOperator", applicantOperator);