469,323 Members | 1,397 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

Replace Function

1
Hi,

How do I use the replace function to replace 2 different parts in a DB.

Dim id,newsitem,newsbody,dt,createdby
id = request("id")
newsitem = replace(request("newsitem"), "'", "''")
newsbody = replace(request("newsbody"), "'", "''")
dt = now()
createdby = request("updateby")

What I need in the 'newsbody' is to replace the ,vbCrLf , <BR> as well as the "'", "''"

or can I add it to the response.write at the viewing end?

Can any one help?

Thanks.
Apr 3 '07 #1
1 967
shweta123
692 Expert 512MB
Hi,

You can replace only one string at a time with Replace .So give different statements for each one of them.

if instr('newsbody' ,vbcrlf)>0 then replace('newsbody',vbcrlf,"") etc.

Is it that you want?
Apr 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by higabe | last post: by
12 posts views Thread by Brian | last post: by
5 posts views Thread by pembed2003 | last post: by
5 posts views Thread by djc | last post: by
10 posts views Thread by pamelafluente | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.