Hello, is there a setting in IIS 5.0 that would quickly fix the following
error?:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
It's strange because some of our .asp pages were working fine for the past
years but recently our website was updated in that old folders were renamed
and the new ones took on the existing name and was wondering why some our
..asp pages are now returning this error? I would think that since the code
hasn't changed and it used to work fine it should be a setting in IIS or in
the properties of a particular folder?
Thanks in advance. 19 5535
zz12 wrote:
Hello, is there a setting in IIS 5.0 that would quickly fix the
following error?:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
No.
>
It's strange because some of our .asp pages were working fine for the
past years but recently our website was updated in that old folders
were renamed and the new ones took on the existing name and was
wondering why some our .asp pages are now returning this error? I
would think that since the code hasn't changed and it used to work
fine it should be a setting in IIS or in the properties of a
particular folder?
You were getting away with poorly written code. Whatever has changed in
your updates has resulted in your no longer being able to get away with
it. You need to debug your code and fix the type mismatches.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
I wonder what it could be then? The asp code hasn't changed and it used to
work fine.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
zz12 wrote:
>Hello, is there a setting in IIS 5.0 that would quickly fix the following error?:
Microsoft VBScript runtime (0x800A000D) Type mismatch
No.
>> It's strange because some of our .asp pages were working fine for the past years but recently our website was updated in that old folders were renamed and the new ones took on the existing name and was wondering why some our .asp pages are now returning this error? I would think that since the code hasn't changed and it used to work fine it should be a setting in IIS or in the properties of a particular folder?
You were getting away with poorly written code. Whatever has changed in
your updates has resulted in your no longer being able to get away with
it. You need to debug your code and fix the type mismatches.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
I don't know what else you expect us to tell you.
The only way to find out is by debugging, figuring out what line of code
is causing the error and fixing the cause of the problem. Start with the
error reported: typically error statements will show a line number. Use
some well-placed response.write statements to display variable values,
etc before the line executes. If that does not help you, post the guilty
section of code here.
zz12 wrote:
I wonder what it could be then? The asp code hasn't changed and it
used to work fine.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>zz12 wrote:
>>Hello, is there a setting in IIS 5.0 that would quickly fix the following error?:
Microsoft VBScript runtime (0x800A000D) Type mismatch
No.
>>> It's strange because some of our .asp pages were working fine for the past years but recently our website was updated in that old folders were renamed and the new ones took on the existing name and was wondering why some our .asp pages are now returning this error? I would think that since the code hasn't changed and it used to work fine it should be a setting in IIS or in the properties of a particular folder?
You were getting away with poorly written code. Whatever has changed in your updates has resulted in your no longer being able to get away with it. You need to debug your code and fix the type mismatches.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sorry for this novice question...when trying to perform an additon equation
on recordset values that are 'float' data types does one need to convert it
using something like CINT(rs("FloatF ield")? Something like...
response.write CINT(rs("FloatF ield") + 987.123456 : response.end
It looks like a co-worker had changed the data type that it uses on our SQL
Server from 'float' to 'decimal' and since the .asp code didn't have any
data conversion functions prior I am pretty certain 'float' data types don't
need to be converted when performing arithmatic equations using recordset
values since it never gave us the Type mismatch error before. It appears
that using CINT is needed for 'decimal' data types which does fix our
problem now but then it loses a portion of the data since we have values
that are 6 precisions which leads me to ask another novice question which
convert function can be used or how can 'decimal' recordset values be
converted without losing it's precision?
Thanks.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:eP******** ******@TK2MSFTN GP06.phx.gbl...
>I don't know what else you expect us to tell you.
The only way to find out is by debugging, figuring out what line of code
is causing the error and fixing the cause of the problem. Start with the
error reported: typically error statements will show a line number. Use
some well-placed response.write statements to display variable values,
etc before the line executes. If that does not help you, post the guilty
section of code here.
zz12 wrote:
>I wonder what it could be then? The asp code hasn't changed and it used to work fine.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message news:%2******* *********@TK2MS FTNGP05.phx.gbl ...
>>zz12 wrote: Hello, is there a setting in IIS 5.0 that would quickly fix the following error?:
Microsoft VBScript runtime (0x800A000D) Type mismatch
No.
It's strange because some of our .asp pages were working fine for the past years but recently our website was updated in that old folders were renamed and the new ones took on the existing name and was wondering why some our .asp pages are now returning this error? I would think that since the code hasn't changed and it used to work fine it should be a setting in IIS or in the properties of a particular folder?
You were getting away with poorly written code. Whatever has changed in your updates has resulted in your no longer being able to get away with it. You need to debug your code and fix the type mismatches.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
No. CInt() is used for converting a value to Integer. You should only use it
if you can do without the decimal portion of the number. The vbscript docs
can be downloaded from http://tinyurl.com/7rk6. When you get them, look up
the CDbl and CSng functions, as well as looking for the descriptions of the
various datatypes (Integer, Long, Single, Double) involved.
In this case, I think your problem may have more to do with floatfield
containing Null values. Is the field configured to allow Nulls?
Incidentally, I agree with your co-worker's decision to move away from
Float.
zz12 wrote:
Sorry for this novice question...when trying to perform an additon
equation on recordset values that are 'float' data types does one
need to convert it using something like CINT(rs("FloatF ield")? Something
like...
response.write CINT(rs("FloatF ield") + 987.123456 : response.end
It looks like a co-worker had changed the data type that it uses on
our SQL Server from 'float' to 'decimal' and since the .asp code
didn't have any data conversion functions prior I am pretty certain
'float' data types don't need to be converted when performing
arithmatic equations using recordset values since it never gave us
the Type mismatch error before. It appears that using CINT is needed
for 'decimal' data types which does fix our problem now but then it
loses a portion of the data since we have values that are 6
precisions which leads me to ask another novice question which
convert function can be used or how can 'decimal' recordset values be
converted without losing it's precision?
Thanks.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:eP******** ******@TK2MSFTN GP06.phx.gbl...
>I don't know what else you expect us to tell you. The only way to find out is by debugging, figuring out what line of code is causing the error and fixing the cause of the problem. Start with the error reported: typically error statements will show a line number. Use some well-placed response.write statements to display variable values, etc before the line executes. If that does not help you, post the guilty section of code here.
zz12 wrote:
>>I wonder what it could be then? The asp code hasn't changed and it used to work fine.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message news:%2****** **********@TK2M SFTNGP05.phx.gb l... zz12 wrote: Hello, is there a setting in IIS 5.0 that would quickly fix the following error?: > Microsoft VBScript runtime (0x800A000D) Type mismatch
No.
> It's strange because some of our .asp pages were working fine for the past years but recently our website was updated in that old folders were renamed and the new ones took on the existing name and was wondering why some our .asp pages are now returning this error? I would think that since the code hasn't changed and it used to work fine it should be a setting in IIS or in the properties of a particula r folder? > You were getting away with poorly written code. Whatever has changed in your updates has resulted in your no longer being able to get away with it. You need to debug your code and fix the type mismatches .
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Will look further into this. Thanks a bunch for your info Bob. Is very
helpful and appreciate it much.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:el******** ******@TK2MSFTN GP05.phx.gbl...
No. CInt() is used for converting a value to Integer. You should only use
it if you can do without the decimal portion of the number. The vbscript
docs can be downloaded from http://tinyurl.com/7rk6. When you get them,
look up the CDbl and CSng functions, as well as looking for the
descriptions of the various datatypes (Integer, Long, Single, Double)
involved.
In this case, I think your problem may have more to do with floatfield
containing Null values. Is the field configured to allow Nulls?
Incidentally, I agree with your co-worker's decision to move away from
Float.
zz12 wrote:
>Sorry for this novice question...when trying to perform an additon equation on recordset values that are 'float' data types does one need to convert it using something like CINT(rs("FloatF ield")? Something like... response.write CINT(rs("FloatF ield") + 987.123456 : response.end
It looks like a co-worker had changed the data type that it uses on our SQL Server from 'float' to 'decimal' and since the .asp code didn't have any data conversion functions prior I am pretty certain 'float' data types don't need to be converted when performing arithmatic equations using recordset values since it never gave us the Type mismatch error before. It appears that using CINT is needed for 'decimal' data types which does fix our problem now but then it loses a portion of the data since we have values that are 6 precisions which leads me to ask another novice question which convert function can be used or how can 'decimal' recordset values be converted without losing it's precision? Thanks.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message news:eP******* *******@TK2MSFT NGP06.phx.gbl.. .
>>I don't know what else you expect us to tell you. The only way to find out is by debugging, figuring out what line of code is causing the error and fixing the cause of the problem. Start with the error reported: typically error statements will show a line number. Use some well-placed response.write statements to display variable values, etc before the line executes. If that does not help you, post the guilty section of code here.
zz12 wrote: I wonder what it could be then? The asp code hasn't changed and it used to work fine.
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message news:%2***** ***********@TK2 MSFTNGP05.phx.g bl... zz12 wrote: >Hello, is there a setting in IIS 5.0 that would quickly fix the >followin g error?: >> > Microsoft VBScript runtime (0x800A000D) > Type mismatch > No. > >> >It's strange because some of our .asp pages were working fine for >the past years but recently our website was updated in that old >folders were renamed and the new ones took on the existing name >and was wondering why some our .asp pages are now returning this >error? I would think that since the code hasn't changed and it used >to >work fine it should be a setting in IIS or in the properties of a >particul ar folder? >> You were getting away with poorly written code. Whatever has changed in your updates has resulted in your no longer being able to get away with it. You need to debug your code and fix the type mismatche s. > >
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
"zz12" wrote:
It looks like a co-worker had changed the data type that it uses on our SQL
Server from 'float' to 'decimal'
That's the killer! VBScript can *NOT* handle the DECIMAL data type!!!!
It can't do *ANY* arithmetic on DECIMAL values.
It can *hold* a DECIMAL value, because all variables in VBScript are
actually "variants" (if you don't know what that means, don't worry about it)
and indeed vt_Decimal is a valid variant.
So if all you do is *output* a DECIMAL value, the underlying COM code can
handily convert decimal to text for you and all is well.
But you simply can *NOT* do arithmetic using DECIMAL.
The correct answer is to *ALWAYS ALWAYS ALWAYS* convert *ALL* DECIMAL values
to DOUBLE using CDBL( ).
response.write CDBL(rs("FloatF ield") + 987.123456
Have you considered shooting the person who made that change in the DB
without testing *ALL* uses of the DB? In our shop, he'd be lucky to still
have a job.
&&&&&&&&&&&& &
There is another solution, by the way. You can convert the data from
DECIMAL to DOUBLE (or even to CURRENCY) in SQL. Whether this is easier or
harder than just finding all the RS("FloatField" ) occurrences and adding on
the CDBL( ) call is up to you.
&&&&&&&&&&&& &
p.s.: Bob Barrows is right; a NULL used with CDBL( ) would cause the same
error message. But given that the code worked until the datatype was
changed, I'm betting that NULLs are *not* the problem.
"Bob Barrows [MVP]" wrote:
Incidentally, I agree with your co-worker's decision to move away from
Float.
I have to VERY STRONGLY disagree with this statement!
Oh, it's nice in principal. But changes like this should NEVER be made
without testing ALL uses of the given database table(s) and field(s).
In this case, the change to DECIMAL indeed means that none of the simple
arithmetic that VBScript was doing will work any more. Every single usage of
those fields in VBScript that involve any kind of calculations will now need
to have CDBL( ) calls added to them.
Quite possibly or even probably, using CDBL( ) *is* the right long-term
solution. But to have it foisted on the site like this, because the idiot
changed the DB without thorough testing, is enough reason to put a really
really black mark on the person's record.
Move away from FLOAT? Okay. But *ONLY* after considering *ALL* the
consequences.
If you are curious about the details:
This shows that the OLEDB type dbtype_decimal is converted to vt_decimal by
ADO: http://msdn.microsoft.com/en-us/libr...86(VS.85).aspx
This shows how DECIMAL is represented in a Variant *AND* shows that
vt_decimal has the value 14 (0x0E). http://msdn.microsoft.com/en-us/library/cc251799.aspx
And this shows that VBScript does *NOT* understand vt_decimal: http://msdn.microsoft.com/en-us/libr...7h(VS.85).aspx
If you ever get a decimal value from a DB, as in
whatever = RS("someDecimal Field")
if you then do
Response.Write VarType(whateve r)
you will find that the answer is 14, thus demonstrating that VBScript
variables *CAN* hold values that VBScript doesn't really understand.
When you then do
whatever = CDBL(whatever)
you are calling COM's variantChangeTy peEx( ) function and *IT* is capable of
understanding and converting many more variant types than VBScript is aware
of.
If you can't read all of this thread, the reason for this demo won't be
obvious. But it's just too much to copy into this msg.
But maybe the demo itself will be clear, anyway. http://www.clearviewdesign.com/Newbi.../DataTypes.asp
If you hit that page, you'll see a "dump" of ONE RECORD from a single Access
database table. I purposely put one field of each of the most usual Access
field types in that table, excepting only DateTime and blobs. Then I put
data into only one record, just for demo purposes. Both BIT and YESNO end up
as the same ADO type (and then of course the same VBS type).
So this page just "dumps" that one record from that one table.
But it "dumps" in what I hope is an enlightening way. The name of each
field indicates what type of field it is. I used a CREATETABLE sql statement
to generate the table, so that I could use both CHAR(10) and VARCHAR(10).
And, as you can see, those are seen as separate ADO data types, though by the
time they get to VBS they are both just strings.
Note that for data types where precision and/or numericScale are
meaningless, ADO supplies 255 as a default value. So the only data type that
shows *BOTH* precision and scale is, as expected, the DECIMAL field at the
bottom. (Currency always has a scale of 4, but I guess ADO doesn't care
about that.)
Note that, indeed as I predicted in an earlier post, the decimalField has a
VBS VarType( ) of 14.
But then notice the last cell in the table: AHA! An error!
"Variable uses an Automation type not supported in VBScript"
So even TypeName( ) can't use that variant type!
AND YET look at the VALUE column!!! There the DECIMAL value is in it's full
(18,6) glory! WHY? Simply because Response.Write *always* needs a STRING to
write and so, when asked to write this DECIMAL variant, it calls the COM
variantChangeTy peEx( ) function which happily converts the DECIMAL to STRING!!
And *THAT* is why you *CAN* use DECIMAL database fields with VBScript *IF*
you don't do any calculations on them! But also, as VarType( ) clearly
demonstrates, you can't do much of anything else with them.
And, yes, that clearly includes arithmetic. Of any kind.
-- Bill Wilkinson This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Arun Wadhawan |
last post by:
Hello
MY SQL Server is causing me this problem :
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'ident'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I am getting from the table datingnew the value of the ident field.
|
by: LJgrnl |
last post by:
I've got a type mismatch error that's driving me nutty. Variable blnNoData
has the initial value False. If a recordset comes back empty (both .EOF and
..BOF are true) then blnNoData is set to True. I then have an if statement to
determine what to write to the screen depending on blnNoData. As long as the
if statement is true (doesn't have to go to the else clause), the code runs
fine. Otherwise, a type mismatch error is returned. In...
|
by: Mark |
last post by:
Hi - I tried this in VS.Net, and also in the Web Matrix code below: -
but I am getting a type mismatch error.
The sql statement runs perfectly from within the Access Query Designer.
Can anyone verify the syntax, and that my .net code is ok - the type
mismatch is happening at: DataGrid1.DataSource =
myCommand.ExecuteReader(CommandBehavior.CloseConnection)
Thanks in advance,
|
by: middletree |
last post by:
I've been messing with this for hours, and have been to various sites,
including Aaron's site, and am truly stumped.
The short version: in SQL Server, the 4 fields in question are datetime. I
have a page that allows users to type in the info (actually a calendar
pop-up allows me to make sure they do it in the correct format), into a
textbox.
When this page gets called up again, I want to prefill the box with the
existing data, in case...
|
by: Mike |
last post by:
I am getting a type mismatch error when I do a bulk insert.
---Begin Error Msg---
Server: Msg 4864, Level 16, State 1, Line 1
Bulk insert data conversion error (type mismatch) for row 1, column 14
(STDCOST).
---End Error Msg---
The STDCOST is set to decimal (28,14) and is a formatted in Access as a
number, single with 14 decimal. I don't know why I would be getting a Type
| |
by: amitbadgi |
last post by:
I am getting teh following error while converting an asp application to
asp.net,
Exception Details: System.Runtime.InteropServices.COMException: Type
mismatch.
Source Error:
Line 347: 'response.Write(sql2)
|
by: Brett |
last post by:
I have a form that calls a method within a DLL. By clicking a button on the
form, the DLL is instantiated and the SaveOutlookMessage() method invoked.
The DLL code copies messages from Outlook to an HTML file. When I execute
the EXE, which is only the form, and click the button, I get a "Type
Mismatch" error on this line in the form: mailobj.SaveOutlookMessage()
Any suggestions on why I'm getting the type mismatch error?
--Form code
|
by: Howard Kaikow |
last post by:
I'm doing a VB 6 project in which I am trying to protect against type
mismatch errors.
Is the process any different in VB .NET?
Here's what I'm doing in VB 6.
I have an ActiveX DLL.
The class has stuff initialized by calling a sub SetClass that wants some
Word specific objects passed-in.
If the user mistakingly uses the wrong object, say, uses an Excel object
|
by: kjworm |
last post by:
Hello Everyone,
I have been fighting with a type mismatch error for many hours today and I can't seem to find what the problem is. Hopefully it is more than a missing apostrophe! I have isolated each SQL statement using a MsgBox and then input that exact code as a Query in access which works. I'm using Access 97 on Windows XP. My code is below:
Dim strKaizen As String
strKaizen = "UPDATE KaizenEvents SET(TeamLeader)= '" & & "' WHERE...
|
by: Lysander |
last post by:
I have written a query that takes three integers representing day,month and year, forms a date from them and compares this date to the date the record was entered and returns any records where the date is more than 10 months out.
The query runs fine, but I when I put the criteria of >10 I get 'Data Type mismatch' error. The code below is the original query. I have since put all the datediff bit in code, with all variables declared as date,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |