string s = "";
if (definition != "")
{
char[] ch = new char[definition.Length];
ch = definition.ToCharArray();
for (int i = 0; i < definition.Length; i++)
{
if (ch[i] == 39)
{
s += ch[i] + "'";
}
else
{
s += ch[i];
}
}
}
respon.write(s);
string s = "";
if (definition != "")
{
char[] ch = new char[definition.Length];
ch = definition.ToCharArray();
for (int i = 0; i < definition.Length; i++)
{
if (ch[i] == 39)
{
s += ch[i] + "'";
}
else
{
s += ch[i];
}
}
}
respon.write(s);
paip.SQL特殊字符转义字符处理 作者Attilax , 1466519819@qq.com 我们都知道SQL Server查询过程中,单引号“'”是特殊字符,所以在查询的时候要转换成
http://www.theblacksheepo
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M