Hi all,
I'm new to ASP so this is probably a problem caused by me.... but here goes.
I have been pulling some information from an access database (specifically a
postcode)
eg. GL3 2SD, I need to swap the space " " for an plus sign "+" and have been
trying to use this code -
<%Dim ModPostCode
If GetPropertiesRecordset.Fields.Item("AddressPostCod e").Value <> ""
Then
ModPostCode=GetPropertiesRecordset.Fields.Item("Ad dressPostCode").Value
Replace(ModPostCode, " " , "+")
=ModPostCode%>
Some other html........
<%End If%>
But I get this Error -
Microsoft VBScript compilation (0x800A0414)
Cannot use parentheses when calling a Sub
/searchresults.asp, line 354, column 31
Replace(ModPostCode, " " , "+")
I have tested all the lines to make sure that the data is OK and in the
variable 'ModPostCode', I just can't get the Replace command working... Any
ideas... anyone... please....
Cheers
Coz. 2 2782
Coz wrote on 20 jul 2003 in microsoft.public.inetserver.asp.general: Cannot use parentheses when calling a Sub Replace(ModPostCode, " " , "+") =ModPostCode%>
You are using repalce as a sub,
but it is a function where you need to use the result:
ModPostCode = Replace(ModPostCode, " " , "+")
I suppose
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
"Evertjan." wrote in message news:Xn********************@194.109.133.29...
SNIP You are using repalce as a sub, but it is a function where you need to use the result:
ModPostCode = Replace(ModPostCode, " " , "+")
I suppose
SNIP
Cheers mate.... I'm happy 'again' - I did say that it was probably something
I was doing.... Typical!!!
Thanks
Coz. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Phrederik |
last post by:
Hey all!
New to javascript and still getting my head around strings...
Consider the following line of code...
var path = location.pathname;
....after execution, the variable "path"...
|
by: Hp |
last post by:
Hi All,
Thanks a lot for all your replies.
My requirement is as follows:
I need to read a text file, eliminate certain special characters(like !
, - = + ), and then convert it to lower case and...
|
by: Dim |
last post by:
I found that C# has some buggy ways to process string across methods.
I have a class with on global string var and a method where i add / remove
from this string
Consider it a buffer... with some...
|
by: tshad |
last post by:
Can you do a search for more that one string in another string?
Something like:
someString.IndexOf("something1","something2","something3",0)
or would you have to do something like:
if...
|
by: WaterWalk |
last post by:
Hello, I'm currently learning string manipulation. I'm curious about
what is the favored way for string manipulation in C, expecially when
strings contain non-ASCII characters. For example, if...
|
by: Anat |
last post by:
Hi,
I need a little help on performing string manipulation:
I want to take a given string, and make certain words hyperlinks.
For example:
"Hello world, this is a wonderful day!"
I'd like the...
|
by: Niyazi |
last post by:
Hi,
Does anyone knows any good code for string manipulation similar to
RegularExpresion?
I might get a value as string in a different format. Example:
20/02/2006 or 20,02,2006 or ...
|
by: morleyc |
last post by:
Hi, i would like to remove a number of characters from my string (\t
\r \n which are throughout the string), i know regex can do this but i
have no idea how. Any pointers much appreciated.
Chris
|
by: Henri |
last post by:
Hi,
How would one go about comparing 2 strings one of which may contain
special entities (eg "cassé" and "cassé")?
I tried to find a way to take the second string and do a replace
whenever such...
|
by: Hels Bells |
last post by:
Hi,
I'm looking to do some manipulation on a string containing html code
in asp which will involve me either using some regular expressions or
just plain old simple replace functionality. The...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |