Hi all,
I've got an asp query that I am running and can't remember how to cloak apostrophies in the string variable so that it doesn't break my VBScript before sending the query to SQL.
Code is something like this:
If varName has an/any apostrophies in it, it of course breaks the string, since ' is a string delimiter in VBScript. I've been told to go through and replace the apostrophy with a tilde(~) or something, but figured there was a more streamlined method where I wouldn't have to parse the string coming in and out of storage. Maybe parse it into the HTML ' equiv?
Thanks,
ryandoah
I've got an asp query that I am running and can't remember how to cloak apostrophies in the string variable so that it doesn't break my VBScript before sending the query to SQL.
Code is something like this:
Code:
strSC = "SELECT dbID, dbName FROM dbTable WHERE dbName LIKE '%" & varName & "%';"
If varName has an/any apostrophies in it, it of course breaks the string, since ' is a string delimiter in VBScript. I've been told to go through and replace the apostrophy with a tilde(~) or something, but figured there was a more streamlined method where I wouldn't have to parse the string coming in and out of storage. Maybe parse it into the HTML ' equiv?
Thanks,
ryandoah