adOpenStatic Logo
Navigation
Home
FAQ
Ken's Blog
Resources
Contact Ken
Copyright 2000 -



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