any ASP gurus out there?
#1
Does anyone know how to replace double quotes in ASP?
3,4,5,6 of them don't work...
Trying to insert into an SQL database:
for x = 1 to Len(form_q27)
if mid(form_q27,x,1)=" then
form_q27=left(form_q27,x-1) + "#" + right(form_q27, (Len(form_q27) -x))
end if
cheers m'dears
[Edited by Richard.S - 7/3/2002 12:44:08 PM]
3,4,5,6 of them don't work...
Trying to insert into an SQL database:
for x = 1 to Len(form_q27)
if mid(form_q27,x,1)=" then
form_q27=left(form_q27,x-1) + "#" + right(form_q27, (Len(form_q27) -x))
end if
cheers m'dears
[Edited by Richard.S - 7/3/2002 12:44:08 PM]
#4
yes, what like this:
form_q25=replace (request.form("q25"),chr(34),"`")
form_q25=replace (form_q25,"'","`")
form_q27=replace (request.form("q27"),chr(34),"`")
form_q27=replace (form_q27,"'","`")
but did this finally:
use \" if you want to represent a double quote inside a set of quotes. So if you're looking for this string- mary said "bollox"
you would use:-
if string=="mary said\"bollox\"" then ....
cheers anyway!
form_q25=replace (request.form("q25"),chr(34),"`")
form_q25=replace (form_q25,"'","`")
form_q27=replace (request.form("q27"),chr(34),"`")
form_q27=replace (form_q27,"'","`")
but did this finally:
use \" if you want to represent a double quote inside a set of quotes. So if you're looking for this string- mary said "bollox"
you would use:-
if string=="mary said\"bollox\"" then ....
cheers anyway!
Thread
Thread Starter
Forum
Replies
Last Post