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) Parameterized Query
- Article ID:
65 - Date Created
Monday, December 6, 2010 - Last Updated
Monday, January 3, 2011 - This Article Has been Viewed
1778 times - Short Desc
When you create a Variable, sometimes you might inadvertently write it out wrong. - Details
When you pass your variable to the query, you must make sure that the variable contains a value, if it does not, you will receive this error.
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Parameterized Query '(@P1 varchar(25))SELECT Users.mpsuid, Users.Username, Me' expects parameter @P1, which was not supplied.
/Statistics.asp, line 8 - Recreate Issue
The following example, uses the variable struns, but does not use it in the Query.
<%
strcuns = Request.Cookie("mycookiename")
Set sqlgetID = Server.CreateObject("ADODB.Command")
sqlgetID.ActiveConnection=PDConn
sqlgetID.Prepared = true
sqlgetID.commandtext="SELECT Username FROM Users WHERE Username=?"
sqlgetID.Parameters.Append sqlgetID.CreateParameter("@username", adVarChar, adParamInput, 25, strcun)
set rsgetID = sqlgetID.execute
%> - Resolve Issue
To correctly write your Query, make sure that it is spelled correctly.
Both area's must be the same, the Request and the Query.
<%
strcun = Request.Cookie("mycookiename")
Set sqlgetID = Server.CreateObject("ADODB.Command")
sqlgetID.ActiveConnection=PDConn
sqlgetID.Prepared = true
sqlgetID.commandtext="SELECT Username FROM Users WHERE Username=?"
sqlgetID.Parameters.Append sqlgetID.CreateParameter("@username", adVarChar, adParamInput, 25, strcun)
set rsgetID = sqlgetID.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