<%
'*********************************
'Function: formatQueryStr(str)
'Arguments: str, SQL statement
'Author: Alixi
'Date: 2007/7/13
'Description: Format like string in sql
'Example: <%=formatQueryStr(str)%>
'*********************************
functionformatQueryStr(str)
dimnstr
nstr=str
nstr=replace(nstr,chr(0),"")
nstr=replace(nstr,"'","''")
nstr=replace(nstr,"[","[[]")
nstr=replace(nstr,"%","[%]")
formatQueryStr=nstr
endfunction
%>