Greetings all..
Simple code to add message to a guestbook, but this won't work.. why??
I get the error:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/guestbook/index.asp, line 87
I know this code SHOULD work... cause I copied it =D
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
Simple code to add message to a guestbook, but this won't work.. why??
Code:
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("guestbook.mdb")
Namn = Request.Form("namn")
Epost = Request.Form("epost")
Hemsida = Request.Form("hemsida")
Meddelande = Request.Form("meddelande")
Ip = Request.ServerVariables("REMOTE_ADDR")
Datum = Now
Conn.Execute("Insert Into guestbook Name,Email,Homepage,Message,Date,Ip) values(Namn,Epost,Hemsida,Meddelande,Datum,Ip)")
Conn.Close
Set Conn = Nothing
Response.Redirect "index.asp"
I get the error:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/guestbook/index.asp, line 87
I know this code SHOULD work... cause I copied it =D
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work