Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is not working... 2

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
Would someone please help me in troubleshooting this code please?

This code is supposed to ignore ' (Apostrophes) marks around comments typed on my comments field in an ASP form.

Here's the error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''this is only a test I'm typing', 'jr_clown@yahoo.com')'.


function changed_tick(fieldstring)
holdstring = ""
for x = 1 to len(fieldstring)
holdchar = mid(fieldstring,x,1)
if holdchar = chr(39) then
holdstring = holdstring & "' " & chr
43) & " char(39) " & chr(43) & "'"
elseif holdchar = chr(34) then
holdstring = holdstring & "' " & chr(43) & " char(34) " & chr(43) & "'"
else
holdstring = holdstring & holdchar
end if
next

changed_tick = "'" & holdstring & "%'"
end function
QUOTE OF THE DAY
The only ideas that will work for you are the ones you put to work.
<%
Jr Clown
:eek:)
%>
 
thxs RoadRacer for the support of my Script !!
I'm so sorry JrClown but I was in a meeting with one of my client's
Hope this works now !!
 
here's the result

I''m going to Miami
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''I'm going to Miami', 'myemail@myisp.com', ' myMgr')'.

/levacation/verify2.asp, line 99

When I saw error on line 99 I tried getting rid of the ' but that did not work either.
If you guys feel like shooting me, feel free %-)

&quot;'&quot;& request.form(&quot;comments&quot;)& &quot;', &quot;&_ = line 99
&quot;'&quot;& session(&quot;email&quot;)& &quot;', &quot; &_
&quot;'&quot;& request.form(&quot;mgr&quot;)& &quot;')&quot;





QUOTE OF THE DAY
The only ideas that will work for you are the ones you put to work.


<%
Jr Clown
%>
 
He he ... don't worry, we don't want to shoot you ... YET!

LOL!

Now your problem is that you 'fixed' the NEW array that SeAL's Function helped you fix ... but you're not using it bro! Notice you're still using the Request.Form Collection which does not have your overloaded single quotes. Try this ...

Code:
&quot;'&quot;& myform(&quot;comments&quot;)& &quot;', &quot;&_  = line 99
&quot;'&quot;& session(&quot;email&quot;)& &quot;', &quot; &_ 
&quot;'&quot;& myform(&quot;mgr&quot;)& &quot;')&quot;
Ed (RoadRacer) Holguin

&quot;I Hate Computers!&quot;
 
Thank you very much fellas, you don't know how much I've appreciated your perseverance, and the time you put into this matter helping a rookie (not a programmer yet) at ASP's

It's working great!!!!


Thanks Again Ed\SeAL

QUOTE OF THE DAY
The only ideas that will work for you are the ones you put to work.


<%
Jr Clown
%>
 
Oh yeah, let me unload the weapon now...

LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL LOL

THANK YOU VERY MUCH FELLAS. QUOTE OF THE DAY
The only ideas that will work for you are the ones you put to work.


<%
Jr Clown
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top