这样写有什么问题么?
string keshi=Request.QueryString["keshi"];
string strsql="select name from renyuan where (role = '1') and (keshi like '"+keshi+"')"; 出现这样的错误:
语法错误 (操作符丢失) 在查询表达式 '(role = '1') and (keshi like ''2'')' 中。
string keshi=Request.QueryString["keshi"];
string strsql="select name from renyuan where (role = '1') and (keshi like '"+keshi+"')"; 出现这样的错误:
语法错误 (操作符丢失) 在查询表达式 '(role = '1') and (keshi like ''2'')' 中。
在sql中如果字段名与关键字冲突的话,最好加上[]
如果是的话,里面有关键字和access的关键字冲突