

This function accepts a single parameter as string and outputs a string with all single quotes doubled.
<%
Function SafeSQL( _
ByVal strToRenderSafe _
)
SafeSQL = Replace(strToRenderSafe, "'", "''")
End Function
strVar = Request.Form("txtField1")
strVar =SafeSQL(strVar)
%>
Back to Code Listing |
Homepage
|