Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-05-12
5
Medium Priority
?
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 24371586
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
ID: 24381522
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 31

Expert Comment

by:Wayne Barron
ID: 24383288
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
ID: 24397385
Issue resolved after handling the Null value error by using the IsNull error handling
0
 
LVL 31

Accepted Solution

by:
Wayne Barron earned 2000 total points
ID: 24397560
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

721 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