Forums

ASP

This topic is locked

Syntax error in INSERT INTO statement

Posted 21 Apr 2006 05:39:26
1
has voted
21 Apr 2006 05:39:26 Robert Robinette posted:
I'm having a problem with a MS Access DB and the ASP page used to update it. Whenever I submit the data I get the '80040e14' Syntax error in INSERT INTO statement . I know the main cause is the use of a reserved word but that's not it, because it works just fine and updates perfectly on my computer/testing server. I only get the error when the pages are posted to the web.

I'm really out of ideas here. Here are the fields and values:

insert into session(tutorID,sessionDate,sessionLength,sessionComments,studentID,sessionSubject,tutorRate) values (1002,'02/18/06',2.00,'This is a test',3,'Verbal',40)

If anyone has an idea I'd love to hear it.

Replies

Replied 21 Apr 2006 06:56:05
21 Apr 2006 06:56:05 micah santos replied:
I would definitely change the table named SESSION co'z that is obviously a RESERVED WORD. although you can use [SESSION] in that case, however, in my own perception, a reserved word always remain as a reserved word.

<%

INSERT into [SESSION] (tutorID,sessionDate,sessionLength,sessionComments,studentID,sessionSubject,tutorRate) values (1002,'02/18/06',2.00,'This is a test',3,'Verbal',40)

%>

Replied 21 Apr 2006 17:31:11
21 Apr 2006 17:31:11 Robert Robinette replied:
THANK YOU!!!

I went to the list of reserved words when this problem first arose and the mADE NO MENTION of the word "session". support.microsoft.com/kb/q209187/

Silly me. I listened to Microsoft when it came to a Microsoft product. I changed the name it is working fine. Thanks again.
Replied 21 Apr 2006 20:58:35
21 Apr 2006 20:58:35 micah santos replied:
sorry to mentioned that "Session" is a reserved word. It's an object.

Reply to this topic