Please here:<%Function getString(str, num)Dim tmp tmp = str tmp = Replace(tmp, "'", "''") tmp = Replace(tmp, "%", "") tmp = Replace(tmp, "-", "") tmp = Replace(tmp, ",", "") tmp = Replace(tmp, "(", "") tmp = Replace(tmp, ")", "") tmp = Replace(tmp, "{", "") tmp = Replace(tmp, "}", "") tmp = Replace(tmp, ">", "") tmp = Replace(tmp, "<", "") tmp = Replace(tmp, """", "") tmp = Replace(tmp, "!", "") tmp = Replace(tmp, "+", "") tmp = Replace(tmp, ":", "") tmp = Replace(tmp, ";", "") tmp = Replace(tmp, "=", "") tmp = Replace(tmp, "&", "") tmp = Replace(tmp, "--", "") If Len(tmp) > num And num > 0 Then tmp = Left(tmp, num) End If getString = tmpEnd FunctionFunction getNumber(str) If str <> "" And IsNumeric(str) Then getNumber = CInt(str) Else getNumber = 0 End IfEnd FunctionFunction Killchar(str) Dim Badchar Dim Newchar Badchar=array("select","Drop",";","insert","delete","xp_") Newchar=str for i=0 to uBound(Badchar) Newchar = replace(Newchar,Badchar(i),"") next Killchar=Newchar End Function %>