I am retrieving two numeric values from a SQL Server table (both have precision 7 and scale 2) and then attempting subtraction with vbScript. Keep getting the "Type Mismatch" error. When I test the data types with vartype and typename functions I get vartype = 14 for both (which I thought meant decimal), but typename give me this
Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript: 'TypeName'
If I apply CStr or CDbl to both values then subtraction works.
What's going on here? What is the data type and why do I have to coerce the data types before subtraction?
Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript: 'TypeName'
If I apply CStr or CDbl to both values then subtraction works.
What's going on here? What is the data type and why do I have to coerce the data types before subtraction?