Microsoft VBScript runtime error '800a000d'

Posted on 2011-10-19
Last Modified: 2012-05-12
Appreciate some help with this if possible -

I'm getting the following error -

Microsoft VBScript runtime error '800a000d'
Type mismatch
/order-detail.asp, line 176

Where line 176 is

<%If (RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0.00 then %>

OrderDeliveryCharge on the table is -

[OrderDeliveryCharge] [decimal](10, 2) NOT NULL,

Thank you
Question by:garethtnash
    LVL 19

    Expert Comment

    Probably your database stored value is not compatible with "0.00", try this:

    <%If cFloat(RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0.00 then %>

    Author Comment

    Umm that now gives me -

    "Microsoft VBScript runtime error '800a000d'
    Type mismatch: 'cFloat'
    /order-detail.asp, line 176"

    LVL 15

    Accepted Solution

    Please try cdbl:

    <%If cdbl(RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0.00 then %>

    LVL 13

    Expert Comment

    by:Jesus Rodriguez
    <% If (RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0.00 then %>

    THEN do what?? Which will be the value that will be posted
    for example

    Dim myNum
    myNum = 23
    If myNum = 6 Then
          Response.Write("Variable myNum = 6")
          Response.Write("**Variable myNum = " & myNum)
    End If

    LVL 19

    Expert Comment

    You also can try to simplify it:

    <%If (RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0 then %>

    Author Closing Comment

    thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
    Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now