Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Aap and Access .Update problems
Old 05-05-2004, 05:25 PM Asp and Access .Update problems
Junior Talker

Posts: 3
Trades: 0
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
CorpusCorvus is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-06-2004, 04:55 PM
Junior Talker

Posts: 3
Trades: 0
Sigh... stupid, stupid mistake. Date, of course, is a reserved word. fixed it, works perfect
CorpusCorvus is offline
Reply With Quote
View Public Profile
 
Old 05-06-2004, 11:31 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
Glad you figured it out. Those reserved words can be a reall pain sometimes.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 05-11-2004, 02:29 PM
Junior Talker

Posts: 3
Trades: 0
Sigh, again...

I asked for the host info ages ago, but never received it. The site is finished, very elegant, and very efficient. Unfortunately, our site is hosted on a freeBSD-Unix server. No ASP allowed. Looks like I get to take a crash course in PHP.
CorpusCorvus is offline
Reply With Quote
View Public Profile
 
Old 05-11-2004, 03:32 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
Is it possible to move to a windows host... it'd be alot easier the rewritting your whole site.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Aap and Access .Update problems
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21434 seconds with 12 queries