OLE automation return codes and error information
Applies to:
SQL Server
The OLE automation system stored procedures return an int return code that is the HRESULT returned by the underlying OLE automation operation. An HRESULT of 0 indicates success. A nonzero HRESULT is an OLE error code of the hexadecimal form 0x800nnnnn, but when returned as an int value in a stored procedure return code, HRESULT has the form -214nnnnnnn.
Example
For example, passing an invalid object name (SQLDMO.Xyzzy) to sp_OACreate causes the procedure to return an int HRESULT of 2147221005, which is 0x800401f3 in hexadecimal.
You can use CONVERT(binary(4), @hresult)
to convert an int HRESULT to a binary value.
For examples of supported conversion, see H. Using CONVERT with binary and character data.
Next steps
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru