[thelist] Re: Adjusting strings for SQL

Chris Marsh chris at ecleanuk.com
Mon Jul 14 11:21:12 CDT 2003


Casey

[..]

> response.write "<input type='hidden' name='block' value=' "&block&" '>

Response.Write "<input type='hidden' name='block' value='" &
Replace(block, "'", "''") & "'>"

This replaces each single quote with two single quotes, thus escaping
the single quote which is itself a character designating comments in
VBScript.

[..]

Regards

Chris Marsh



More information about the thelist mailing list