|
Hullo all,
Ive been out of the asp water for awhile(since college, really) and I have recently been asked to fix our companies site. I am having a problem adding to an access database.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/tmp1/process.asp, line 31
Code:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file = "adodb.asp"-->
<%
'########################
'File: proccess.asp
'Author:
'Date: 5.5.04
'Purpose: to add form data to tmp.db and display download
'Last modified: 5.5.04
'########################
'open recordset
dim objRS
set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "contact", objConn, , adLockOptimistic, adCmdTable
'end open
'Read form data (post) into DB
objRS.AddNew
objRS("name") = request.form("name")
objRS("company") = request.form("company")
objRS("phone") = request.form("phone")
objRS("email") = request.form("email")
objRS("contact") = request.form("contact")
objRS("hear") = request.form("hear")
objRS("date") = Date & Time
objRS.Update
objRS.Close
Set objRS = nothing
'end read
'close connection
objConn.Close
set objConn = nothing
'End close
%>
Line 31 happens to be objRS.Update
why is this happening, Ive been working over it for awhile now and have turned to the web. any help would be appreciated. I haven't worked with this in years.
Last edited by CorpusCorvus; 05-05-2004 at 06:29 PM..
Reason: mistyped title
|