Please excuse me if this the wrong group for this question.
I am in the processing of building an online knowledge repository. The
database will hold little bits of information which I have gleaned over
the years, and continue to acquire.
Some of these bits of knowledge are source code snippets. The problem
I am running into is when I attempt to store these snippets utilizing a
SQL INSERT command, I get a Syntax error in the Query expression. It
appears that IIS is attempting to execute the code, which is stored in
a variable, rather than storing the variable data in the database.
For example, if the variable strCode contains:
<%
response.buffer =true
check = request.cookies("read")
if check = "" then
response.write "you didn't read it before" & "<p>"
response.write "It's Secret!! " & "<p>"
response.write "^____^" & "<p>"
response.cookies("read") = "ok"
else
response.write "you already read it" & "<p>"
response.write "thank you" & "<p>"
end if
%>
I hit submit on my form, and I end up with:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression
My questions is, is there a way to encode the code snippet in such a
way as to allow it to be inserted in the database? There must be...
there are tons of sites out there that utilize code libraries.
Probably something simple, but I am just not seeing it!
Any assistance appreciated...
Thanks,
Derek