asp 格式化sql中的like字符串
asp 格式化sql中的like字符串
发布时间:2016-12-29 来源:查字典编辑
摘要:

<%

'******************************

'函数:formatQueryStr(str)

'参数:str,SQL语句

'作者:阿里西西

'日期:2007/7/13

'描述:格式化sql中的like字符串

'示例:<%=formatQueryStr(str)%>

'******************************

functionformatQueryStr(str)

dimnstr

nstr=str

nstr=replace(nstr,chr(0),"")

nstr=replace(nstr,"'","''")

nstr=replace(nstr,"[","[[]")

nstr=replace(nstr,"%","[%]")

formatQueryStr=nstr

endfunction

%>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新ASP教程学习
热门ASP教程学习
编程开发子分类