首次回答:对于这个提示,是因为把 sql 语句作为字符串,而 Where 后的整个条件都用了参数,例如:'Select * From table Where @strWhere Order By'。
只需把 Where 的条件用连接符连起来就不会报错,例如:'Select * From table Where ' + @strWhere + 'Order By'。
admin 2015-04-11 追问