读书人

帮小弟我看一下这个SQL语句错在哪里 s

发布时间: 2012-03-12 12:45:33 作者: rapoo

帮我看一下这个SQL语句错在哪里 string strSql= "select * from aa where FuName like '% @FuName %' order by id desc";
帮我看一下这个SQL语句错在哪里 string strSql= "select * from aa where FuName like '% @FuName % ' order by id desc ";

帮我改一下吧

[解决办法]
@
[解决办法]
'% '+@FuName + '% '
[解决办法]
string strSql= "select * from aa where FuName like '% "+@FuName+ " % ' order by id desc ";

[解决办法]
'% ”+@FuName +“% '
[解决办法]
string strSql= "select * from aa where FuName like '% '+@FuName+ '% ' order by id desc ";


[解决办法]
打开SQL 查询分析器,把你的这段sql语句copy上去,编译,自己找错(备注:变量的地方,自己随意写个测试值,引号去掉,只要编译没错就行了)

读书人网 >asp.net

热点推荐