Microsoft VBScript runtime error '800a000d'

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
garethtnashAsked:
Who is Participating?
 
pateljituConnect With a Mentor Commented:
Please try cdbl:

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

Article:
http://www.w3schools.com/vbscript/vbscript_ref_functions.asp
0
 
BardobraveCommented:
Probably your database stored value is not compatible with "0.00", try this:

<%If cFloat(RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0.00 then %>
0
 
garethtnashAuthor Commented:
Umm that now gives me -

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

Thanks
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Jesus RodriguezIT ManagerCommented:
<% 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")
Else
      Response.Write("**Variable myNum = " & myNum)
End If
%>

0
 
BardobraveCommented:
You also can try to simplify it:

<%If (RsOrderSummary.Fields.Item("OrderDeliveryCharge")) > 0 then %>
0
 
garethtnashAuthor Commented:
thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.