PRB: VBScript "Type Mismatch" Error When Field Type Is adNumeric (306916)
The information in this article applies to:
- Microsoft Data Access Components 1.5
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- Microsoft Active Server Pages
This article was previously published under Q306916 SYMPTOMS
When you use Visual Basic Scripting Edition (VBScript) to perform a numeric comparison or calculation on an adNumeric (131) field type, you may receive the following error messages:
Microsoft VBScript runtime error '800a000d'
Type mismatch
Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript
CAUSE
These error messages occur because VBScript cannot properly convert adNumeric values to a valid numeric type.
RESOLUTION
You can use either of the following two possible workarounds:
- Use the CDbl or CInt function to convert the adNumeric field.
- Use JScript, which does not exhibit this behavior.
STATUS
This behavior is by design.
| Modification Type: | Major | Last Reviewed: | 12/3/2003 |
|---|
| Keywords: | kbprb KB306916 |
|---|
|