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
)
%>
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
)
%>