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 OLE DB Provider for SQL Server (0x80040E14) Incorrect syntax near
- Article ID:
63 - Date Created
Monday, December 6, 2010 - This Article Has been Viewed
1785 times - Short Desc
Writing SQL Update Statements will somtimes cause an Incorrect syntax near ' issue. Watch your comma's between your Columns to avoid this issue. - Details
When writing out your Update Query, you sometimes forget to add in all the comma's between the columns for the table. If this happens, you will receive the following error:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near 'RHCity'.
/newreg.asp, line 350 - Recreate Issue
To recreate this issue, perform the following:
<%
sql.commandtext="update myTable set col1=?, col2=? col3=?, col4=? where col5=?"
%>
In the above SQL Update statement, you will notice that we left out our comma between the col2=? and col3=? columns. - Resolve Issue
To correctly write our this SQL Update statement, perform the following.
<%
sql.commandtext="update myTable set col1=?, col2=?, col3=?, col4=? where col5=?"
%>
As you can see, we have added the comma between col2=? and col3=?
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