SQL INSERT
Hi,
I'm having trouble inserting data into my access db.
I have 4 fields in my table:
id - Autonumber
title - memo
body - memo
date- date/time
here is my asp:
---------------------------------
set objcomm = server.createobject("adodb.command")
set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
conString = "DBQ=" & Server.MapPath("db\blog.mdb")
objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & conString
title = request.form("title")
body = request.form("body")
objcomm.activeconnection = objConn
objcomm.commandtext = "INSERT INTO blog(title,body) VALUES ('" & title & "','" & body & "')"
objcomm.execute
-----------------------------------
And here is the error:
------------------------------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Chelsea were leading after Juliano Belletti deflected Damien Duff's cross into his own net after 32 minutes.Substitute Maxi Lopez quickly fired Barca level before Samuel Eto'o smashed in the winner with 17 minutes left. It was cruel luck on Chelsea, who had'.
/w00t/admin/add-action.asp, line 17
-----------------------------------------
|