Replace Function - Error 80020009
I try to use the replace function with a very long text and I have this error :
error '80020009'
Exception occurred.
Do you have any idee to resolve this problem ?
I try to use the replace function with a very long text and I have this error :
error '80020009'
Exception occurred.
Do you have any idee to resolve this problem ?
I have this piece of code in an ASP page: replace (strRootDir, "", "/", -1) When I run the script I get:
Microsoft VBScript compilation (0x800A0414)
Cannot use parentheses when calling a Sub
II remove the parenthese then I get:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
Everthing that I found on the web (and in Studio help) indicates that "REPLACE (String, ToFind, With, Count)" is correct. What am I doing wrong?
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 RelatedI have a function that i am using that is recursive but i get an error when i use it. i have turned off friendly error messages but the error is still the same.
error '80020009'
Exception occurred. /Category_new.asp, line 93
Code:
I am a designer who has inherited an ASP site to maintain (and who has somewhat limited skills in this area) and I have come to the end of my rope on this one, and was hoping that some munificent ASP guru could help me out. The page I am referring to has been working FINE for 3+ years and today comes up with an error message:
error '80020009'
Exception occurred.
/recipe-index.asp, line 91
Here is the totality of the section the error message refers to: Code:
Before the addition of line 28, when a user login it either accepts it if it validates correctly. If the email or pw failed then it redirects to a "bad user name or password page."
After the addition of line 28, when a user login with the correct email and pw then it works normally...
however when a user uses a invalid login entry the error page does not show up... instead it gives a 80020009 Code:
Due to my browser being danishm the error message will not mean much to most of you. It is an "Unspecified problem" with "Provider (0x80004005)"
POST Data: error '80020009'
The error only arrives with some apperently random files being uploaded ....
Set Mail = Server.CreateObject("CDONTS.NewMail")
Mail.From = "myE-mailHere@myDomain.com"
Mail.To = "me@mycompany.com"
Mail.BCC= email
Mail.Subject = "Welcome to Kindis website"
Mail.BodyFormat = 0
Mail.MailFormat = 0
Mail.Body = "<h2>Hello</h2><br><b>This is my e-mail in HTML format</b>"
Mail.Send
Set Mail = Nothing <---- Line 121
%>
when i try sending the email i get this error:
CDONTS.NewMail.1 error '80020009'
Unable to connect to server
/kindis/register4.asp, line 121
does it have to be with the mail server im sending to or should i be including a file in this file?
I'm getting an '80020009' error when I try to display items from my dictionary object. Code:
View Replies View RelatedI'm working on a page that is supposed to generate a PDF from fields in an Access database. The user is supposed to be able to generate a pdf. Instead a " error '80020009'" is returned in line 55. Could someone lend a hand? Here's the code (line 55 is the beginning of the form field document at "WHOLENAME")
<%@LANGUAGE="VBSCRIPT"%> .....
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/prod.asp, line 0
what does BOF & EOF mean??
ADODB.Field</FONT> error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /systeminfo.asp, line 0
I could use some input on how to avoid this error. I am fairly new to .asp and scripting, so I'm open to all comments/suggestions. I am geting this error when I try to access an area of the database which does not yet contain data in the record. Code:
ADODB.Field error '80020009' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. Code:
View Replies View RelatedI get the follow error on a linux box that is running sun asp:
CDONTS.NewMail.1 error '80020009' unable to connect to server
The error occurs when the Send Command is Executed. Here is my code:
I've tried EVERY way i can think of to do this replace function, basically when i go to insert "Do's and Dont's into the database it cuts it off at "Do" because of the ' now ill show you my section of code that i have it in currently:
curdescription = trim(replace(arrTemp(4), "'", "''"))
I have it this way and it doesnt work, and i even had it
curdescription = trim(arrTemp(4))
curdescription = replace(curdescription, "'", "''")
I'm trying to use the replace function to change a variable ie like this:-
replace folder_old, txtOldFoldername,folder_rename
folder_old = c:DocumentsRoot_Testob
txtOldFoldername = bob
folder_rename = newfoldername
all i want to do is to beable to change the name bob to the new folder, is there a easier way to do this or am I on the right track. if i do the replace like this replace(folder_old, " & txtOldFoldername & "," & folder_rename & ")
i get this error:-
Cannot use parentheses when calling a Sub
how can i replace all single quotes in a string to double quotes:
Replace(strLog_text, "'", """)
however, this doesn't work, as you might expect.
I'm trying to replace the pipe character with a null value? Is that possible?I'm trying the following:
Replace(Request("strategyA"), "|", "")
I can't get it to work.Is my syntax incorrect?
I'm making an email system, except it doesn't work when the name has spaces in it. Therefore, I want to replace these with "%20"s. Code:
View Replies View RelatedI have this code i would like to replace some html in a file with nothing before i insert into db. I am getting this error
Microsoft VBScript compilation error '800a0409'
Unterminated string constant Code:
I need to replace several letters to different strings ,I need it in one variable .How can I do that?
If InStr(1,request.form("S8"),"A",1)>0
or InStr(1,request.form("S8"),"B",1)>0
or InStr(1,request.form("S8"),"C",1)>0 then
a=Replace(request.form("S8"),"A","You could use occasionally")
b=Replace(request.form("S8"),"B","You could use often")
c=Replace(request.form("S8"),"C","You would actively promote")
End if
I want a replace function which replaces all double quotes with single quotes.
eg :-- It'''''s my post.
So after replacing it shud give me -- It's my post.Basically i want a recursive replace function.
i am new to asp and i am having problems using the replace() function to replace occurrences of text in a string.basically what i want to do is replace any occurrences of a double quote (") in a string with "
the code i am using looks like this:
set overview=replace(overview,"""",""")
but when i run load the page i get the following error:
Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "A 13 year old girl p"]'
/ASP/index.asp, line 58
did i get the syntax wrong? i figured that if i was looking for a single quote that i just had to put an escaped double quote "" inside of the quotes.
I am trying to make the user input form more secure and so I want to use this piece of code
[vbs]Replace(strInput, "'", "''")[/vbs]
but my sql query (which already works) looks like this
[vbs]insSQL = "insert into Details
(ServiceName, Bor_ID, Address, Postcode, Tube, Rail, Bus, Parking,
Tel, Fax, Minicom, Email, Contact, Opening, Eligibility, Access,
OtherFacil, Special, Internet, Other, Cat_ID, URI_ID, Db_ID, Des_ID, Main_ID)
values ('" & Request.Form("ServiceName") & "','" & Request.Form("Borough") & "','" & Request.Form("Address") & "','" & Request.Form("Postcode") & "','" ...[/vbs]
How am I best to implement the code? I tried to do this
[vbs]& Replace(Request.Form("ServiceName"), "'", "''") &[/vbs]
in the actual sql query but I got this error
[vbs]Data type mismatch in criteria expression. [/vbs]
How is it best to do this?
I have searched so many "Replace" function topics, but there is something that I don't understand....I found some like this... Replace(strField, " ' ", " ' ' ") .... do anyone knows what's the use of replacing ' with ' ' ?
View Replies View RelatedI need help with this one line of code that im having trouble putting together.
[VBS]<%= Replace(Recordset.Fields.Item("MyField").Value,"<" "& lt")%>[/VBS]
this allows me to display raw code on a page that is entered into an Access memo field. Trouble is it all comes out in one line, so i tried adding a [VBS]VbClRf, "<BR>"[/VBS] to it and am getting string errors. Ive tried a few variations and it's really bugging me.
I was wondering if any one could help me, I'm try to insert this info in to my database o'farrel and I'm using this Code:
mail1 = replace(Request.Form("email1"),"'","''")
when it inserts the information it looks like this for the email link O'fo@site.com .
i have stuffed some comment from database within teaxtarea, problem is text are displaying as cobination of data and html tag like <br> (data and <br>) like as follows
this is the first line means<br> this is the second line. i wrote replace code as comment=replace(comment,vbcrlf,"<br>") while adding this comment to database. how could i come out from this problem.
Code:
ln = Trim(getLive("liveName"))
ln = replace(ln, "'", "''")
ln = replace(ln, chr(34), chr(34))
ln = replace(ln, "=", chr(61))
ln = replace(ln, "_", chr(95))
ln = Replace(ln, "../", chr(46)&chr(46)&chr(47))
ln = Replace(ln, "--", chr(45)&chr(45))
ln = Replace(ln, ";", chr(59))
I have the above code... is the bit where I am replacing "../" valid or can I get rid of the "&"? Can't test it at the moment so that's why I am asking here.
I seem to end up with too many double quotes when using this clean up function.. either that or I am missing a display function when I display the details from the dB.
My function
Code:
Function CleanFormFields(FieldString)
FieldString = Replace(FieldString, "�", "'")
FieldString = Replace(FieldString, "�", """""")
FieldString = Replace(FieldString, "�", """""")
FieldString = Replace(FieldString,"""","""""")
FieldString = Replace(FieldString, "'", "''")
FieldString = Trim(FieldString)
CleanFormFields = FieldString
End Function
I only really wanted the microsoft ouble quote to become one set of double quote instead of double as I have here but I can't get away with anything less.
essentially when I input a � I get a "" when I only want ".
Can the replace() function in asp be used on an excel spreadsheet? I can't seem to find out anywhere, and I can't just test and see because my connection string keeps throwing Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Excel Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x664 Thread 0x19b8 DBC 0xebb6e6c Excel' . (but thats another story/future post perhaps ) I pretty much just need to know if replace() will work.
Does anyone know of a function (preferably already made) that would replace a string starting from it's start position to it's end position with a specific string...
so like have four parameters:
(StringToSearch, ReplaceString, WhereToStartReplacing, WhereToEndReplacing)
I use a replace char function to remove any bad words from user's input to prevent SQL injection. Here is what I use:
Function killChars(strWords)
Dim badChars, newChars
badChars = Array("bad words here")
newChars = strwords
For i=0 to uBound(badChars)
newChars = replace(newChars, badChars(i), "")
next
killChars=newChars
End function
Now the problem is if a user enter "DeLETe" in the input box, and this word is not get removed before entering the DB. because I entered "delete" in the badchars array.
so how can I enable a case sensitive in my function? So the bad words would get deleted regardless its in upper or lower case?