檢查sql字符串中是否有單引號,有則進行轉化

- 中國WEB開發者網絡 (http://www.webasp.net)
-- 技術教程 (http://www.webasp.net/article/)
--- 檢查sql字符串中是否有單引號,有則進行轉化 (http://www.webasp.net/article/1/756.htm)
-- 作者:未知
-- 發佈日期: 2003-04-16
<%
rem 檢查sql字符串中是否有單引號,有則進行轉化
function CheckStr(str)
dim tstr,l,i,ch
l=len(str)
for i=1 to l
ch=mid(str,i,1)
if ch="'" then
tstr=tstr+"'"
end if
tstr=tstr+ch
next
CheckStr=tstr
end function
%>

以上資料由動網先鋒(http://www.aspsky.net)整理製作,轉載請說明出處!

webasp.net