Out Of String Space: 'Replace'
All of a sudden this morning my ASP files started generating the error:
Out of String Space: 'Replace'
These script files have been running just fine for several weeks with no
problems. I did review the code and yes the script is calling the
Replace function at the line specified in the error information.
I'm puzzled as to why the code would all of a sudden start generating
this error ?
View Replies
ADVERTISEMENT
My form gets populated from an access database. Now in the database there are fields containg <br>. While in a normal page everything works as it's supposed to, in my listbox the <br> shows as it is. What I would like to do is replace it with a space so I've used this:
<option value="<%=(rsProducts.Fields.Item("CatNum").Value)%>"><%=replace(rsProducts.Fi elds.Item("NotesR").Value),"<BR>"," "%></option>
but it doesn't seem to work.
What exactly am I doing wrong here?
View Replies
View Related
Does anyone have an example of how to replace all whitespace at the end of a string?
I'm trying something like:
do while right(str,1) = " "
str = replace(right(str,1)," ","")
loop
response.write("str:" & str)
.... but it is killing off the entire string ...
View Replies
View Related
Sometimes I am getting the errormessage "Out of string space ". The error occurs on this code:
sBrf = sBrf & sBodyTmp & "par page par "
When this occurs len(sBrf)<100.000 and len(sBodyTmp)<10.000. Also there is about 1,5gb fysical memory free. I am using Windows 2000 IIS5. I tried isolating the proces in IIS to make sure no other scripts are involved, but it doesn't help.
View Replies
View Related
I have a combo box bulit by taking in values from database. some of the values have spaces in between them
e.g
<select name="place">
<option value="Presidents Office">President's Office</option>
</select>
So when i use this code to read
Response.write(Request.Form("place"))
Its only returns me President's
HOw can make it include whole string including spaces..?
View Replies
View Related
is there anyway of separating a string by either a space or + sign,I have an sms.asp page that receives a string in this format below
http://acompany.co.uk/online/intern...text=19%2Bdavid
the last part text=I need to split into 2 parts I need to read the first part 19 and match that to the db and then deal with the name David,I have tried everything, is there anyway of doing this even if the string read text=19+david if there was a way of separating the two.
View Replies
View Related
i want to replace string.
a= "I am trying to replace a string from 1 point to another point which is
point 2. But I dont know how ? "
b = "This"
Now from string a I want to replace from 1 to 2 with string b="this"
so the final string will be like c
c= "I am trying to replace a string from this. But I dont know how ?
View Replies
View Related
i have the content of a db field output as 'GUEST' on a asp page, i would like to replace it with 'Guest' using the replace function, but im getting kinda lost with the syntax..can anyone help with an example?
View Replies
View Related
The string contains the text " this is "test" message"
when I pass the string the function , it gives the problem/
I tried this method:
replace(st,""","""")
it doesnot work
what is the solution to this problem?
View Replies
View Related
let say i have one string
"today, i eat, a, bread"
how can i count where is the comma and then i need to replace them with spaces? is it just use Replace(str,","," ")?
View Replies
View Related
I want to replace everything after a colon (:) in a string using ASP
Replace.
Here's an example of the procedure I want to perform:
dim hr1, hr1replace
hr1 = "H.R. 1908: Patent Reform Act of 2007 (On Passage)"
hr1replace = REPLACE(hr1,": [WILDCARD GOES HERE]","")
so the remaining text is only: H.R. 1908
View Replies
View Related
I have this sentence
"I like to eat apple"and I need to change it to "i like to eat orange"
i have to check either the string contain apple or not. If yes, then i need to replace the "apple" to "orange" else i done nothing to the string.
can anyone show me how to write this in asp code?
View Replies
View Related
I'm executing a stored procedure where I have the values hard-coded. I need to replace the hard-coded values with variables.Here is the hard-coded line:
Query_Allo_Amt = "exec app_get_alloc_ABR 'STRATEGY', 'AUS', 2005"
I need to replace STRATEGY with cmdAlloAmts__alloc_type, AUS with cmdAlloAmts__ddo, and 2005 with cmdAlloAmts__ay. I've made several attempts at replacing the hard-coded values with the variables and come up with different error messages. How can I replace the hard-coded values with variables in the above line?
View Replies
View Related
colleages are creating links in asp sites. however the links are static . is there a way to replace the links with another prefix ?? (on the fly) e.g.
<a href="../../files/abc.zip">some link</a>
is replaced to:
<a href="http://www.domain.com/files/abc.zip">some link</a> and this for all files in the site ? i read something about a replace function but can't use it properly .
View Replies
View Related
I'm using the following function to replace quote marks from a string into a format allowing storage into an Access database: Code:
View Replies
View Related
In the ASP page that is in question, I build a large string (no more
than 10K) which is basically an email template in HTML format. Then I
replace the parts with the values, which are also strings with the size
of 1-2 KB. Code:
View Replies
View Related
I'm going to make a database of rude words, that i do not want users to name themselves when they use my scoreboard. I need my asp to scan their string and if a word from the database appears replace the entire string with anonymous.
I have some code which was designed to astrisk out all but the first and last letter of any appearing rude word
eg: d**n this b****y game
or godd**nit
i have changed this to just replace each word to anonymous, but cant get it to the stage above, can any one help? My code so far is below. Code:
View Replies
View Related
If I replace "a" with "b", and then I replace "b" with "a", shouldn't I get the same result? That is what I am trying to encode and decode with Replace() function, but it is giving me different things when I replace and replace again. Here is what I am talking about: Code:
View Replies
View Related
i have a form where a user will enter their information.... i know how to check if the user didn't enter a value so that they are not redirected to the next page but how to check if the user pressed space and not allow that space character to be a valid character?
View Replies
View Related
I have a webpage with some hyperlink within a button. The problem is that some of my hyperlink is shorter that others and therefore the user must navigate to the hyperlink to click on the link
The thing I want is to make the button more user-friendly user can click anywhere on the button and not only on the hyperlink within the button
Here is my code ....
View Replies
View Related
In an ASP Page is there a way to have a link that calls another page whose name includes a space? For example, I'd like to be able to call "My Page.asp" by building a href type link the user can click on. The equivalent of:
<a href="My Page.asp"> Open </a> the page
I've tried URLEncode but that didn't work.
View Replies
View Related
I’m reading a list of values from a database table a creating a dropdown list on a web page. These are used as search criteria to search on a second table. The user selects and item from a list and then clicks a button to submit the search. All of that works.
Most search words in the list are a single word with no spaces. Some are two words. When that is passed, anything passed second space gets lopped off. Here is the line of code that creates the dropdown box
sDataSet = rs1("Dataset")
response.write "<OPTION selected value=" & sDataSet & ">" & sDataSet
I tried this, but it didn’t work
response.write "<OPTION selected value=" & Replace(sDataSet, “ “, “%20”) & ">" & sDataSet
It replaced the space with %20, and the entire search phrase was passed, but the search failed because the %20 was not converted to a space on the other end. So now I doing the conversion myself after I do the Request.Form. Is there a better way though, to deal with spaces.
View Replies
View Related
i need to combine 2 vriables that are retrieved from a form. idate and
itime.i want to put these into the t_date field in my sql db. but for it to work
properly, there needs to be a space between the idate and itime.
how do i do this?
i know i should know this, and i have used it before. but it has been so
long, that i can't remember for the life of me.
View Replies
View Related
1. dopage.asp?<% =SessionID=value_here%> is different tha
2. dopage.asp?<%=SessionID=value_here%> ??
Please note that there is a space between the asp tags and the = sign in the first item. I thought ASP will treat #1 and #2 as the same. However it seems that is not the case.
View Replies
View Related
can anyone fix the space problem in my sql statement? I am getting this error message:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
This is my sql statement:
sql = "SELECT * FROM " & tblname & " WHERE " &Col& " = N'" &Var& "' AND [Show]=1 ORDER BY [Code] ASC"
And I am passing the parameters to the url something like this:
Product.asp?Visit=Yes&Var=Hong%20-%20Kong&Col=Place
Problem is that most of my data contain a space (eg. Hong Kong).
I don't have this error when my data is single word (eg. Sydney)
View Replies
View Related
I want to check the disk drive space on a small intranet. Like 30 computers. All have been partitioned and have a D: drive that is shared and is the drive I'm trying to check. This is basically what I have tried:
Code:
Dim fs, pcdrive, cdrive, n
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set pcdrive = fs.GetDrive("xx.xx.xx.xxshare01-d")
Response.Write("Share01 Free Drive Space is: " & pcdrive & "<br>")
set pcdrive = nothing
set fs = nothing
Is there something wrong with the code or would it possibly have to do with permissions? When this script runs,I get a page cannot be displayed.
View Replies
View Related
when it writes the varFault option to SQL, there is lots of whitespace written too!I have tried the Trim option but to no joy
<%@LANGUAGE="VBSCRIPT" %>
<%OPTION EXPLICIT
Dim objConn, strSQL, objRS, varName, VarExt, VarFault, varDept, strSQL1, objRS1
Set objConn = Server.Createobject("ADODB.Connection")
objConn.open Application("helpdesk")
varName = Request.Form("name")
varDept = Request.Form("departments")
varFault = Request.Form("txtFault")
strSQL = "INSERT INTO new_calls (Name, Department, Fault) VALUES "
strSQL = strSQL & "( '" & varName & "','" & varDept & "','" & varFault & "')"
strSQL1 = "SELECT * FROM new_calls "
strSQl1 = strSQL1 & "WHERE call_id= '"'
set objRS = objConn.Execute(strSQL)
%>
View Replies
View Related
Say I have a 'Mc Paul' in the database, what would i need to do if the user searched for 'McPaul' how could i pull that record out of the DB.
View Replies
View Related
I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how?
View Replies
View Related
Now that my website is compleate(ish), I am looking for server space(for free) to host it on. A lot of the ones I have seen, for some reason, do not support classic ASP.
View Replies
View Related
If I try to retrieve a char field from MySQL with 11111111
in the field I have no problem, however if I put in: 11111 111111
then it doesn't retrieve the part after the spaces it seems to just chop it at the first space. Can anyone help my with the code to make it work.
View Replies
View Related
where i can find a myspace clone?
View Replies
View Related
I trying to find the memory occupied by the object in RAM, For Example:
Set ObjTest = Server.CreateObject("ADODB.RecordSet")
I need the space occupied by the ObjTest in RAM. Is it possible ?
View Replies
View Related