BUG: ExecuteWithResultsAndMessages2 Does Not Return Results (279514)
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 Q279514
BUG #: 17969 (SQLBUG_65)
BUG #: 39552 (SQLBUG_70)
BUG #: 235353 (SHILOH)
SYMPTOMS
When called from Microsoft Visual Basic Script (VBScript), the ExecuteWithResultsAndMessages2 method does not return results. Instead, it generates a run-time error similar to the following:
Windows Script Host
Error: Type mismatch: 'db.ExecuteWithResultsAndMessages2'
Code: 800A000D
Source: Microsoft VBScript runtime error
The ExecuteWithResultsAndMessages2 method works correctly within Visual Basic when the variable is defined as a string.
CAUSE
The ExecuteWithResultsAndMessages2 method executes a Transact-SQL command batch, returns batch result sets in a QueryResults object, and captures messages raised as part of command batch execution. A string is used to return the message output, but the VB script uses a variant data type. The mismatch between the string and variant data types causes the type mismatch error.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5.
Microsoft has confirmed this to be a problem in SQL Server 7.0.
Microsoft has confirmed this to be a problem in SQL Server 2000.
Modification Type: | Major | Last Reviewed: | 11/17/2003 |
---|
Keywords: | kbbug kbpending KB279514 |
---|
|