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:
80040e14 There are fewer columns in the INSERT statement than values specified in the VALUES clause.
- Article ID:
6267 - Date Created
Wednesday, May 3, 2023 - This Article Has been Viewed
739 times - Short Desc
While editing sql statements, mistakes are easily made, an in this case, we missed a parameter that needed to be removed with its corresponding variable. - Details
When writing and editing your SQL Statements, you may inadvertently add or remove a parameter causing the following error.
Microsoft OLE DB Driver for SQL Server error '80040e14'
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
/Inserts.asp, line 46 - Recreate Issue
The following code will reproduce the error, and it is clear to see what is causing it.<%
Set InsertStart = CreateObject("ADODB.Command")
InsertStart.ActiveConnection=siteConn
InsertStart.Prepared = true
InsertStart.commandtext = "insert into ATime (ID, StartDate)values(?,?,?)"
InsertStart.Parameters.Append InsertStart.CreateParameter("@ID", adInteger, adParamInput, , strID)
InsertStart.Parameters.Append InsertStart.CreateParameter("@StartDate", adVarChar, adParamInput, 5, getTenure)
InsertStart.execute
%> - Resolve Issue
In this example, it is an easy fix. Remove or add a parameter, and in this case, we are going to remove one of the Question Marks.<%
Set InsertStart = CreateObject("ADODB.Command")
InsertStart.ActiveConnection=siteConn
InsertStart.Prepared = true
InsertStart.commandtext = "insert into ATime (ID, StartDate)values(?,?)"
InsertStart.Parameters.Append InsertStart.CreateParameter("@ID", adInteger, adParamInput, , strID)
InsertStart.Parameters.Append InsertStart.CreateParameter("@StartDate", adVarChar, adParamInput, 5, getTenure)
InsertStart.execute
%>
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