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 error '80040e14' Syntax error in UPDATE statement, access 2007 reserved words
- Article ID:
138 - Date Created
Wednesday, June 22, 2011 - Last Updated
Saturday, June 25, 2011 - This Article Has been Viewed
1805 times - Short Desc
Access Database 2007 - 2010 have a reserved word list that is slightly different from previous versions of Access, and with this change, we have to do things a little differently than we had to before. - Details
Access 2007 - 2010 have reserved words that are different from previous versions of Microsoft Access. And with this change, we have to make sure that are coding changes along with it. Why Microsoft decided to add in these new words is most likely for security issues, Either way, we have to change along with them.
If you use the reserved word in your Select, Update, Delete, Insert Statements without first adding brackets around the reserved word, you will get an error like the following.
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/encrypt.asp, line 28 - Recreate Issue
To recreate this issue.
<%
Set getPW = Server.CreateObject("ADODB.Command")
getPW.ActiveConnection=objConn
getPW.CommandText = "update Users set password=? where password=?"
getPW.Parameters.Append getPW.CreateParameter("@password", adVarChar, adParamInput, 255, md5(chPW("password")))
getPW.Parameters.Append getPW.CreateParameter("@password", adVarChar, adParamInput, 255, chPW("password"))
getPW.execute
%>
In Access Database, the word: Password
Is a reserved word. - Resolve Issue
To resolve this issue.
<%
Set getPW = Server.CreateObject("ADODB.Command")
getPW.ActiveConnection=objConn
getPW.CommandText = "update Users set [password]=? where [password]=?"
getPW.Parameters.Append getPW.CreateParameter("@password", adVarChar, adParamInput, 255, md5(chPW("password")))
getPW.Parameters.Append getPW.CreateParameter("@password", adVarChar, adParamInput, 255, chPW("password"))
getPW.execute
%>
What we have done here to correct the issue without having to change our column name in our database, is to add brackets around the word: Password
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