|
Ok, it was not a good idea to post that code. It was something that I created using Dreamweaver's SQL creator.
Dose this look better? No wildcards, WHERE statement and MM_UserName is the username session variable that is created.
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open MM_connSeek_STRING
SQL = "INSERT INTO tblSearchResults (result, category, location, user) " _
& " VALUES('" & Keyword & "', '" & CategoryTable & "', '" & Location & "', '" & MM_UserName & "')"
conn.Execute SQL
%>
Adding this to the code, Response.Write "DEBUG SQL: " & SQL & "<HR>".
Gives me a result of this.
DEBUG SQL: INSERT INTO tblSearchResults (result, category, location, user) VALUES('', '', '', '')
--------------------------------------------------------------------------------
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/html/results.asp, line 34
Any suggestions on how to fix/trouble shoot the error?
|