PRB: How to Use sp_displayoaerrorinfo in the sp_OA Samples (151602)
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 Q151602 SYMPTOMS
The sp_OA procedure samples use the sp_displayoaerrorinfo procedure. However,the correct procedure is sp_OAGetErrorInfo.
Here is a corrected example:
EXEC @hr = sp_OACreate 'SQLDMO.SQLServer', @object OUT
IF @hr <> 0
EXEC sp_displayoaerrorinfo @object, @hr
NOTE: For SQL Server 6.5 'SQLOLE.SQLServer' needs to be used instead of 'SQLDMO.SQLServer'
MORE INFORMATION
The sp_displayoaerrorinfo procedure is not installed by default. If you prefer to use the wrapped stored procedure, the text of this stored procedure can be found in the "OLE Automation Return Codes and Error Information" section of the "Books Online."
Modification Type: | Minor | Last Reviewed: | 3/14/2005 |
---|
Keywords: | kbBug kbprb kbProgramming KB151602 |
---|
|