CFF Knowledge Base
CFF KB has 207 listed Articles with 287,419 page views
Search KB Articles
Barnes and Noble
Music - Led Zeppelin - Houses of the Holy (1973)
Music - Led Zeppelin - Houses of

$15.38
Clicks = 70
Barnes and Noble
Music - Rodrigo y Gabriela - Live in France (2011)
Music - Rodrigo y Gabriela - Live

$11.73
Clicks = 71
VioSoftware.com
Home & Office - Microsoft Expression Studio 4 Ultimate (Open Business with Software Assurance)
Home & Office - Microsoft Expression Stud

$763.18
Clicks = 76
Microsoft Store
Mice - Razer Naga 2012 Expert MMO Gaming Mouse
$79.99
 
17 MMO-optimized buttons
3 interchangeable side panels
Powered by Razer Synapse 2.0 software
Mice - Razer Naga 2012 Expert MM

$79.99
Clicks = 104
Microsoft Store
AT&T - HTC Titan II for AT&T
Combine blazing-fast 4G LTE speed with a huge, 4.7-inch crystal-clear Super LCD display, a 16 MP auto-focus camera, and the cool and useful Windows Phone operating system, and you've got the HTC Titan II.
AT&T - HTC Titan II for AT&T Com

Prices May Vary
Clicks = 124

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.
CFF Knowledge Base Article - 11 - ADODB.Command error '800a0d5d' Application uses a value of the wrong type for the current operation

ADODB.Command error '800a0d5d' Application uses a value of the wrong type for the current operation

Article ID: 11 - Date Created Tuesday, September 28, 2010 - This Article Has been Viewed 6117 times.
Article was last updated on: Wednesday, November 17, 2010

ADODB.Command error '800a0d5d' Application uses a value of the wrong type for the current operation

CFF Knowledge Base - Share on MySpace CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
Share With Friends (Updated 6-8-2010)
When you are trying to query your table, your QueryString may not be properly defined. (or) if you are sending to many characters to your Parameter with a set Character Length.


Details
If your QueryString is not properly defined or misspelled, you will receive this error

 
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation.
rss.asp, line 8


(or) Scenaria #2:
If you are trying to send to many characters to your Parameterized Query.

 
ADODB.Command (0x800A0D5D)
Application uses a value of the wrong type for the current operation.
Inserts.asp, line 290


Recreate Issue
In the below SQL Query, we are getting our ID from the QueryString of rss.


<%
rss = ProtectSQL(request.QueryString("rss"))
Set sqlRSS = Server.CreateObject("ADODB.Command")
sqlRSS.ActiveConnection=objConn
sqlRSS.Prepared = true
sqlRSS.commandtext="Select id, RSSFeed FROM MyTable WHERE id=? AND RSSFeed=1"
sqlRSS.Parameters.Append sqlRSS.CreateParameter("@id", adInteger, adParamInput, , rss)
set rsRSS = sqlRSS.execute
%>



We instead Query our string as:
page.asp?rsss=1

Scenaria #2:

<%

Set sqlFFiltnd = CreateObject("ADODB.Command")
sqlFFiltnd.ActiveConnection=objConn
sqlFFiltnd.commandtext="update DTable set DFolder='NotDefault' where id=? and PicsFolder=?"
sqlFFiltnd.Parameters.Append sqlFFiltnd.CreateParameter("@id", 3, 1, , MineID)
sqlFFiltnd.Parameters.Append sqlFFiltnd.CreateParameter("@PFolder", 200, 1, 25, strFolderName)
sqlFFiltnd.execute

%>


In the above code, are 5th line which is our PFolder, has a character count of 25.
This will cause this error if you have over 25 characters to go into the field.


Resolve Issue
To correctly call our Query, we need to make sure that our QueryString matches our Variable that we define within our code.

page.asp?rss=1
Will get our records and display them back to us properly.


<%
rss = ProtectSQL(request.QueryString("rss"))
Set sqlRSS = Server.CreateObject("ADODB.Command")
sqlRSS.ActiveConnection=objConn
sqlRSS.Prepared = true
sqlRSS.commandtext="Select id, RSSFeed FROM MyTable WHERE id=? AND RSSFeed=1"
sqlRSS.Parameters.Append sqlRSS.CreateParameter("@id", adInteger, adParamInput, , rss)
set rsRSS = sqlRSS.execute
%>



Scenaria #2:

<%

Set sqlFFiltnd = CreateObject("ADODB.Command")
sqlFFiltnd.ActiveConnection=objConn
sqlFFiltnd.commandtext="update DTable set DFolder='NotDefault' where id=? and PicsFolder=?"
sqlFFiltnd.Parameters.Append sqlFFiltnd.CreateParameter("@id", 3, 1, , MineID)
sqlFFiltnd.Parameters.Append sqlFFiltnd.CreateParameter("@PFolder", 200, 1, 75, strFolderName)
sqlFFiltnd.execute

%>


On line #5, we have changed the Character count from 25 allowed Characters to 75
This gives us more room to allow for special characters, especially if you are using a function to converts characters over to hex or so forth.