阅读背景:

sql语句中出现非法字符单引号怎么办?

来源:互联网 

我们就把一个单引号替换成两个单引号.

string.Format(" itempath like '{0}%' and ItemType='1' and deep='{1}' ", dr["itempath"].ToString().Replace("'", "''"), Convert.ToInt32(dr["deep"]) + 1);string.Format(" itempath l



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: