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.
  • Breadrumbs:
  • Microsoft VBScript runtime error '800a000d' type mismatch

  • 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)
  • Article ID:
    174
  • Date Created
    Saturday, June 30, 2012
  • Last Updated
    Friday, December 21, 2012
  • This Article Has been Viewed
    1695 times
  • Short Desc
    When writing your variables, you have to wrap them within the ASP Brackets which is <%=VARIABLE%>, if it is not written out properly, or you are missing the equal sign, you will receive this error.
  • Details
    Sometimes when you get in a hurry, you might forget to add in some extra code that is need to make your code function and work properly. And when that happens, you receive the following error.

     

    Microsoft VBScript runtime error '800a000d'
    Type mismatch: 'sid'
    /adminfile.asp, line 120
  • Recreate Issue
    To recreate this issue.
    Scenario #1
    The following example will demonstrate how to create this error.

    <%sid%>

    Scenario #2
    When you pass a form variable to your processing page to validate the entry, you have to make sure that you are testing the correct variable against it.

    Example
    <%if request.form("sid")=0 then
    'pass information here%>
  • Resolve Issue
    To resolve this issue:

    Scenario #1:
    In this case, we have out variable held within the bracket, however, we are missing the equal sign.
    The correct way to write this is:
    <%=sid%>
    As you can see, we have the = sign placed prior to the Variable.

    Scenario #2:
    To test your variable against the right type of information rather TEXT or INTEGER values.

    Example
    <%if request.form("sid")="0" then
    'pass information here%>


    Looking at the above information you will see that it differs from the Recreate example, and that it has the number 0 wrapped in double quotes.
    This will allow the script to run, and without error.