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 the keyword 'DEFAULT'
- Article ID:
26 - Date Created
Wednesday, October 6, 2010 - Last Updated
Wednesday, November 17, 2010 - This Article Has been Viewed
3932 times - Short Desc
When sending information to a sql statement rather it is select, insert, update, delete you will sometimes mistype of incorrectly call your variable to the query. - Details
If your are performing a select, update, insert or delete statement and your variables are not being sent to the statement, then it will cause this error.
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'DEFAULT'.
page.asp, line 140 - Recreate Issue
To recreate this issue, using the following example
<%
ID = ProtectSQL(request.Form("IDs"))
Set sqlDelete = Server.CreateObject("ADODB.Command")
sqlDelete.ActiveConnection=objConn
sqlDelete.commandtext="update PDServer set MySendersFolder='Trash' where ID=?"
sqlDelete.Parameters.Append sqlDelete.CreateParameter("@ID", adInteger, adParamInput, ,ID )
sqlDelete.execute
%>
In the above example, the Request.form("IDs") is not correct. - Resolve Issue
To correct this issue.
<%
ID = ProtectSQL(request.Form("ID"))
Set sqlDelete = Server.CreateObject("ADODB.Command")
sqlDelete.ActiveConnection=objConn
sqlDelete.commandtext="update PDServer set MySendersFolder='Trash' where ID=?"
sqlDelete.Parameters.Append sqlDelete.CreateParameter("@ID", adInteger, adParamInput, ,ID )
sqlDelete.execute
%>
As you can see, the request.form("ID") does not have the s at the end, so the record can now be sent through and deleted in this statement.
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