Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit a9c3f62

Browse files
sean-blochrwestMSFT
authored andcommitted
Refresh CAST and CONVERT, include PR 8388
This seems to be the appropriate place to call out the date range differences for the Year values of date, datetime, datetime2. A simplified example is shown with an expected error message
1 parent 440b91b commit a9c3f62

3 files changed

Lines changed: 678 additions & 572 deletions

File tree

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
---
22
title: "OLE automation return codes and error information"
3-
description: Learn the details about OLE automation return codes and how to convert error code information.
4-
ms.custom: ""
5-
ms.date: "03/10/2022"
3+
description: Learn the details about OLE automation return codes and how to convert error code information.
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: randolphwest
7+
ms.date: 12/21/2022
68
ms.service: sql
7-
ms.reviewer: ""
89
ms.subservice: stored-procedures
910
ms.topic: conceptual
10-
helpviewer_keywords:
11+
helpviewer_keywords:
1112
- "return codes [SQL Server]"
1213
- "OLE Automation [SQL Server], return codes"
1314
- "OLE Automation [SQL Server], errors"
14-
author: WilliamDAssafMSFT
15-
ms.author: wiassaf
1615
monikerRange: ">=sql-server-2016"
1716
---
1817
# OLE automation return codes and error information
1918

2019
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2120

22-
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 0x800*nnnnn*, but when returned as an **int** value in a stored procedure return code, HRESULT has the form -214*nnnnnnn*.
21+
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 0x800*nnnnn*, but when returned as an **int** value in a stored procedure return code, HRESULT has the form -214*nnnnnnn*.
2322

2423
## Example
2524

26-
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.
27-
25+
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.
26+
2827
You can use `CONVERT(binary(4), @hresult)` to convert an **int** HRESULT to a **binary** value.
2928

30-
For examples of supported conversion, see [H. Using CONVERT with binary and character data](../../t-sql/functions/cast-and-convert-transact-sql.md#h-using-convert-with-binary-and-character-data).
29+
For examples of supported conversion, see [H. Using CONVERT with binary and character data](../../t-sql/functions/cast-and-convert-transact-sql.md#h-use-convert-with-binary-and-character-data).
3130

3231
## Next steps
3332

34-
- [sp_OAGetErrorInfo (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-oageterrorinfo-transact-sql.md)
33+
- [sp_OAGetErrorInfo (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-oageterrorinfo-transact-sql.md)
43.7 KB
Loading

0 commit comments

Comments
 (0)