Solved

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

Posted on 2009-05-12
5
288 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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…
Suggested Courses

630 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