Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

any ASP gurus out there?

Thread Tools
 
Search this Thread
 
Old Mar 7, 2002 | 12:41 PM
  #1  
Richard.S's Avatar
Richard.S
Thread Starter
Scooby Regular
 
Joined: Feb 2002
Posts: 232
Likes: 0
Talking

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]
Reply
Old Jul 3, 2002 | 01:18 PM
  #2  
Dream Weaver's Avatar
Dream Weaver
Scooby Regular
25 Year Member
Liked
 
Joined: Feb 2000
Posts: 9,846
Likes: 4
From: Lancashire
Question

What do you want to replace them with? Just remove them I presume from a form input?

DW
Reply
Old Jul 3, 2002 | 01:48 PM
  #3  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

use chr(34)

david
Reply
Old Jul 3, 2002 | 02:08 PM
  #4  
Richard.S's Avatar
Richard.S
Thread Starter
Scooby Regular
 
Joined: Feb 2002
Posts: 232
Likes: 0
Talking

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!
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Darrell@Scoobyworx
Trader Announcements
26
Jan 30, 2024 01:27 PM
ozzy
Scotland
6
Oct 24, 2001 01:04 PM
Mojo
Non Scooby Related
8
Aug 24, 2001 09:56 AM
mega_stream
Non Scooby Related
2
Aug 9, 2001 07:51 PM




All times are GMT +1. The time now is 11:50 PM.