BUG: Sp_OA Procedures May Produce "Bad Variable Type" or "Type Mismatch" Error (173848)
The information in this article applies to:
- Microsoft SQL Server 6.5
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q173848
BUG #: 17172 (SQLBUG_65)
36455 (SQLBUG_70)
36455 (SHILOH)
SYMPTOMS
When you attempt to call sp_OAMethod, you may receive either of the
following errors:
Error: 0x800200008 Bad variable type
Error: 0x80020005 Type mismatch
Either of these messages can be returned if your variable has not been
initialized or contains a value of NULL.
If the datatype you are passing is not a string datatype, it cannot be
passed by reference. Attempting to pass values other than string by
reference results in the "Type mismatch" error.
WORKAROUND
To work around this problem, do any one of the following:
- Initialize your variable to a default value.
- Do not use NULL values.
- Use string data types wherever possible.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 2/14/2005 |
---|
Keywords: | kbBug kbcode KB173848 |
---|
|