Help with adding guestbook comments in mdb file
davelochner | Posted 10:18pm 12. September 2008 Server Time |
I am in desperate need of help. I keep getting this error message from my asp coding below - Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/add_to_guestbook.asp, line 17 .
If anyone has any ideas of what to do to fix this I would greatly appreciate any help.
Thanks,
Dave
<%
Dim adoCon
Dim strSQL
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("guestbook.mdb") & ";"
strSQL = "insert into tblComments"&_
" (Name ,Comments)"&_
" values ("&_
"'"&Request.Form("Name")&"',"&_
"'"&Request.Form("Comments")&"',"&_
")"
adoCon.execute(strSQL)
Set adoCon = Nothing
Response.Redirect "guestbook.asp"
%>
|
|
|