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:
    7282
  • Date Created
    Tuesday, July 30, 2024
  • This Article Has been Viewed
    216 times
  • Short Desc
    ASP Classic will give a type mismatch error when getting the size of a file if it is not formatted correctly.
  • Details
    When using a function in ASP Classic to get the file size will give you a type mismatch error if the formatting is not correct.
  • Recreate Issue
    The following lines will give you the type mismatch error "sometimes"

    <%
    Filesize = bytes / 1024
    %>
  • Resolve Issue
    Taking the code from above, we need to add CDbl.

    <%
    Filesize = CDbl(trim(bytes)) / 1024
    %>