Function Get_SafeStr(str) dim BadStr,myarry,IsSafe,starttime,dlltime str=lcase(str) BadStr = "and|(|)|exec|insert|select|delete|update|count|chr|mid|master|truncate|char|declare|@|'|;|x|~|!|#|$|%|^|&|*|_|+|\|=|-|?|"&chr(34)&"" myarry=split(BadStr,"|")
for i=0 to ubound(myarry) if instr(str,myarry(i))>0 then str=replace(str,myarry(i),"") Get_SafeStr=Get_SafeStr(str) else Get_SafeStr=str end if next end function