CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft JET Database Engine (0x80040E14) Syntax error in INSERT INTO statement (or) Syntax error in UPDATE INTO statement
- Article ID:
69 - Date Created
Tuesday, December 14, 2010 - Last Updated
Tuesday, December 14, 2010 - This Article Has been Viewed
2343 times - Short Desc
In Microsoft Access, if you name your Column a reserved word, you may get this error when running your ASP INSERT (or) UPDATE Statement - Details
In Microsoft Access Database when you create your Table for Users and name the password column as: Password, you will get the error below.
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/Inserts.asp, line 36
You are receiving this error because the word Password is a reserved word for Access.
Now, if you are the own of the Database, I would suggest changing the word to something else (or) if you are planning on switching over to SQL Server in the near future, then you can leave the Password alone as it will not give you a problem in SQL Server. - Recreate Issue
To recreate this issue.
Have your Access Users Table column named: Password
Your SQL INSERT (or) UPDATE statement will be like so:
INSERT
<%
sql.commandtext="insert into mytable (username, password)values(?,?)"
%>
UPDATE
<%
sql.commandtext="update mytable set username=?, password=? where uid=?"
%> - Resolve Issue
To correct this error
Scenario #1:
Rename the Column in your Access Database from
Password
to
myPassword
Scenario #2:
Wrap the password name in your Statement with brackets []
INSERT
<%
sql.commandtext="insert into mytable (username, [password])values(?,?)"
%>
UPDATE
<%
sql.commandtext="update mytable set username=?, [password]=? where uid=?"
%>
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825