Ask a Question related to ASP, Design and Development.
-
John Smith #1
Replace
Hi,
Just wanted to check that I'm doing things the right way..........
I need to create a string along the lines of "23,43,78,23" with no comma at
the beginning or end of it. The data comes out of a table so i've created a
loop to get the data and form the string :
StrRecip = "," & objRS("number") & StrRecip
This will give me something like : ",42,78,67,2,90"
And then I've removed the leading comma :
StrRecipRem = replace(StrRecip, ",", "", 1, 1)
Is there actually a better way ?
Thanks
J.
John Smith Guest
-
help with the replace(pattern, replace)
hii i hope you can help me, i want to replace two parameters on the same replace, the idea it's print in a textArea a XML file from a webService,... -
Replace into..??
Hallo Group, is there an equivelant/replacement of the MySQL Command "Replace Into" for Access/MS SQLServer? "Replace Into" does either... -
Search and replace (super global replace)
I am using the 30 day trail of acrobate professional....before I buy it I have a few questions.... 1) is there a "search and replace" function... -
SQL Replace
I've looked at BOL and through dejanews for a solution (similar post from Lamine Darbouche on 30th July in this group) but cannot find a solution.... -
Replace in ASP/VBS/SQL
I need to replace all occurancies of "is" in "This is a test (is), is, penis." with "<a href=is.htm>is</a>". The thing is, if I use a simple... -
Ray at #2
Re: Replace
That'll work, or you can do something like right(var, len(var) - 1). It'll
all be about the same. Another thing that you may want to look at though is
the getstring method of the recordset object. If you are only pulling in
the "number" column in your recordset, you can grab all the values at once
from the recordset with them all comma delimited, then close and destroy the
rs immediately without having to loop through it. Take a look here,
[url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth02_11.asp[/url] and post
back if you have questions.
Ray at home
"John Smith" <john@smith.com> wrote in message
news:bn8rs5$ii3$1@hercules.btinternet.com...at> Hi,
>
> Just wanted to check that I'm doing things the right way..........
>
> I need to create a string along the lines of "23,43,78,23" with no commaa> the beginning or end of it. The data comes out of a table so i've created> loop to get the data and form the string :
>
> StrRecip = "," & objRS("number") & StrRecip
>
> This will give me something like : ",42,78,67,2,90"
>
> And then I've removed the leading comma :
>
> StrRecipRem = replace(StrRecip, ",", "", 1, 1)
>
> Is there actually a better way ?
>
> Thanks
>
> J.
>
>
>
>
>
Ray at Guest
-
Phill. W #3
Re: Replace
"John Smith" <john@smith.com> wrote in message
news:bn8rs5$ii3$1@hercules.btinternet.com...
.. . ... . .> I need to create a string along the lines of "23,43,78,23" with no
> comma at the beginning or end of it. The data comes out of a table
> so i've created a loop to get the data and form the string :StrRecipRem = Mid( StrRecip, 2 )> This will give me something like : ",42,78,67,2,90"
>
> And then I've removed the leading comma :
HTH,
Phill W.
Phill. W Guest



Reply With Quote

