Solved

Gtting error message Microsoft VBScript runtime (0x800A000D) Type mismatch

Posted on 2009-05-12
5
274 Views
Last Modified: 2012-05-06
Hi,
I have few calculations on my ASP page and when I use to run the page I am getting the error message. I code generates the total number of cases done from the sum of a numeric field operator and another code generates the sum oftime diffrence between the start and end time in second. When on next line which is used to generate the average handle time(AHT) by dividing the time diffrence with the total number of case then I am getting the error message. I am enclosing the code for all three steps.
Steps to generate number of cases:-

Select Sum(cases) as IntTotal51 from prsmic_master where prsmic_master.UserID='"&UserID&"' and prsmic_master.Inputdate>='"&fdate&"' and prsmic_master.Inputdate<='"&tdate&"' and prsmic_master.Uploaddate>='"&fdate&"' and prsmic_master.Uploaddate<='"&tdate&"' and prsmic_master.Status="&t1&"

output of this is stored in a variable Product68

Steps to generate total time spent on doing these cases:-

Select sum(datediff(s,(Starttime),(Endtime))) AS Prod from PrSmic_master where UserID="&UserID&" and prsmic_master.Inputdate>='"&fdate&"' and prsmic_master.Inputdate<='"&tdate&"' and prsmic_master.Uploaddate>='"&fdate&"' and prsmic_master.Uploaddate<='"&tdate&"' and (contactid in(select distinct groupid from PrSmic_master where groupid is not null) or id in(select distinct groupid from PrSmic_master where groupid is not null))

output of this is stored in a variable prhr13

Calcualtion of AHT:-

Aht1=prhr13/Product68

Open in new window

0
Comment
Question by:rohit_jha7
  • 3
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Wayne Barron
Comment Utility
you are getting the error on this line correct?
>>   Aht1=prhr13/Product68
What is   [ Aht1 ]
Is it a Number Field? If it is, then you have a / that is generating the error.
If you need to have these numbers inserted into the Field, then you will need to change
It Type from [Numbers] to [Text] in your database.

If I am incorrect in my assumption, please explain a little more about the issue.
Carrzkiss
0
 

Author Comment

by:rohit_jha7
Comment Utility
AHT1 is a numeric field. Also the output stored on the Product68 from the sum(cases), where the cases field is numeric data type.
0
 
LVL 30

Expert Comment

by:Wayne Barron
Comment Utility
Aht1 -- Number Field
prhr13/Product68  --   This is a string (Text)

You are receiving the error, because you are trying to pass a Text-String into a Number Field.
If you are going to be needing to send this type of Data over to the field.
Then change this Fields [Data Type = Text] instead of [Data Type = Number]
And you will see that it works without issue now.
If it needs to remain as a [Data Type = Number] Then I suggest that you send "Numerical" Values
To the field instead of "Text" Values.

Let me know if you still have problems.
Carrzkiss
0
 

Author Comment

by:rohit_jha7
Comment Utility
Issue resolved after handling the Null value error by using the IsNull error handling
0
 
LVL 30

Accepted Solution

by:
Wayne Barron earned 500 total points
Comment Utility
strange.
>> Aht1=prhr13/Product68
This would cause the error as well, as it is not a Number that is being passed, but Text String.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

763 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

8 Experts available now in Live!

Get 1:1 Help Now