Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

80040e14 Error

Status
Not open for further replies.

MadJock

Programmer
May 25, 2001
318
GB
Hi folks,

I am trying to execute a very simple query but an getting the following error:

Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/cammach/handleUser.asp, line 10

The SQL Statement it refers to is:

INSERT INTO tblUsers (UserID, Password) VALUES ('asdasd','fdgdfg')

The database in Access 2000. I have many insert queries in my app and they work fine. The SQL statement is not causing a key violations and works fine when ran directly in Access itself.

I have seen the MS knowledge base article which assumes that the ASP page has been created by Access, but this is not the case.

The ASP Code is:

<!--#include file=&quot;CodeBase.inc&quot;-->
<% IF session(&quot;validUser&quot;) = &quot;true&quot; then
login=request.form(&quot;txtUsername&quot;)
password=request.form(&quot;txtPassword&quot;)
dim oConn

strSQL = &quot;INSERT INTO tblUsers (UserID, Password) VALUES ('&quot; & login & &quot;','&quot; & password & &quot;')&quot;
response.write strSQL
openConn()
oConn.Execute strSQL
closeConn()
'response.redirect(&quot;admin.asp&quot;)
else%>
<body>
You are not logged in! Please <a href=&quot;login.asp&quot;>do so now</a>
</body>
<%end if%>


I would be very grateful if anyone has a suggestion.

Thanks in advance website:
 
The word password is a reserved word for Access, try naming it something like UserPass and see if that clears up your problem. Or you might be able to get away with
Code:
[tblUsers.Password]
. Can't remember, I generally staty as far away from reserved words as possible in order to cut down on work for myself later when I can't remember which were reserved words and which weren't :p

-Tarwn
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top