Knowledge Base

PRB: How to Use sp_displayoaerrorinfo in the sp_OA Samples

Article ID: 151602

Article Last Modified on 3/14/2005


APPLIES TO


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."

Additional query words: sproc

Keywords: kbbug kbprogramming kbprb KB151602