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="CodeBase.inc"-->
<% IF session("validUser"
= "true" then
login=request.form("txtUsername"
password=request.form("txtPassword"
dim oConn
strSQL = "INSERT INTO tblUsers (UserID, Password) VALUES ('" & login & "','" & password & "')"
response.write strSQL
openConn()
oConn.Execute strSQL
closeConn()
'response.redirect("admin.asp"
else%>
<body>
You are not logged in! Please <a href="login.asp">do so now</a>
</body>
<%end if%>
I would be very grateful if anyone has a suggestion.
Thanks in advance website:
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="CodeBase.inc"-->
<% IF session("validUser"
login=request.form("txtUsername"
password=request.form("txtPassword"
dim oConn
strSQL = "INSERT INTO tblUsers (UserID, Password) VALUES ('" & login & "','" & password & "')"
response.write strSQL
openConn()
oConn.Execute strSQL
closeConn()
'response.redirect("admin.asp"
else%>
<body>
You are not logged in! Please <a href="login.asp">do so now</a>
</body>
<%end if%>
I would be very grateful if anyone has a suggestion.
Thanks in advance website: