Skip to content

Commit 2fee4d4

Browse files
authored
Merge pull request #1119 from msebolt/consolidation-oledb-pr9
consolidation oledb pr9
2 parents 321a3d7 + 4430f82 commit 2fee4d4

9 files changed

+189
-272
lines changed

.openpublishing.redirection.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,36 @@
660660
"redirect_url": "/cpp/data/oledb/cdatasource-class#openwithservicecomponents",
661661
"redirect_document_id": false
662662
},
663+
{
664+
"source_path": "docs/data/oledb/cdberrorinfo-getallerrorinfo.md",
665+
"redirect_url": "/cpp/data/oledb/cdberrorinfo-class#getallerrorinfo",
666+
"redirect_document_id": false
667+
},
668+
{
669+
"source_path": "docs/data/oledb/cdberrorinfo-getbasicerrorinfo.md",
670+
"redirect_url": "/cpp/data/oledb/cdberrorinfo-class#getbasicerrorinfo",
671+
"redirect_document_id": false
672+
},
673+
{
674+
"source_path": "docs/data/oledb/cdberrorinfo-getcustomerrorobject.md",
675+
"redirect_url": "/cpp/data/oledb/cdberrorinfo-class#getcustomerrorobject",
676+
"redirect_document_id": false
677+
},
678+
{
679+
"source_path": "docs/data/oledb/cdberrorinfo-geterrorinfo.md",
680+
"redirect_url": "/cpp/data/oledb/cdberrorinfo-class#geterrorinfo",
681+
"redirect_document_id": false
682+
},
683+
{
684+
"source_path": "docs/data/oledb/cdberrorinfo-geterrorparameters.md",
685+
"redirect_url": "/cpp/data/oledb/cdberrorinfo-class#geterrorparameters",
686+
"redirect_document_id": false
687+
},
688+
{
689+
"source_path": "docs/data/oledb/cdberrorinfo-geterrorrecords.md",
690+
"redirect_url": "/cpp/data/oledb/cdberrorinfo-class#geterrorrecords",
691+
"redirect_document_id": false
692+
},
663693
{
664694
"source_path": "docs/dotnet/index.md",
665695
"redirect_url": "/cpp/dotnet/dotnet-programming-with-cpp-cli-visual-cpp",

docs/data/oledb/TOC.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@
102102
### [CDataConnection Class](cdataconnection-class.md)
103103
### [CDataSource Class](cdatasource-class.md)
104104
### [CDBErrorInfo Class](cdberrorinfo-class.md)
105-
#### [CDBErrorInfo::GetAllErrorInfo](cdberrorinfo-getallerrorinfo.md)
106-
#### [CDBErrorInfo::GetBasicErrorInfo](cdberrorinfo-getbasicerrorinfo.md)
107-
#### [CDBErrorInfo::GetCustomErrorObject](cdberrorinfo-getcustomerrorobject.md)
108-
#### [CDBErrorInfo::GetErrorInfo](cdberrorinfo-geterrorinfo.md)
109-
#### [CDBErrorInfo::GetErrorParameters](cdberrorinfo-geterrorparameters.md)
110-
#### [CDBErrorInfo::GetErrorRecords](cdberrorinfo-geterrorrecords.md)
111105
### [CDBPropIDSet Class](cdbpropidset-class.md)
112106
#### [CDBPropIDSet::AddPropertyID](cdbpropidset-addpropertyid.md)
113107
#### [CDBPropIDSet::CDBPropIDSet](cdbpropidset-cdbpropidset.md)

docs/data/oledb/cdberrorinfo-class.md

Lines changed: 159 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,188 @@ ms.custom: ""
44
ms.date: "11/04/2016"
55
ms.technology: ["cpp-data"]
66
ms.topic: "reference"
7-
f1_keywords: ["CDBErrorInfo", "ATL::CDBErrorInfo", "ATL.CDBErrorInfo"]
7+
f1_keywords: ["CDBErrorInfo", "ATL::CDBErrorInfo", "ATL.CDBErrorInfo",
8+
"ATL.CDBErrorInfo.GetAllErrorInfo", "CDBErrorInfo::GetAllErrorInfo", "ATL::CDBErrorInfo::GetAllErrorInfo", "GetAllErrorInfo", "CDBErrorInfo.GetAllErrorInfo",
9+
"CDBErrorInfo::GetBasicErrorInfo", "ATL.CDBErrorInfo.GetBasicErrorInfo", "CDBErrorInfo.GetBasicErrorInfo", "ATL::CDBErrorInfo::GetBasicErrorInfo", "GetBasicErrorInfo",
10+
"CDBErrorInfo::GetCustomErrorObject", "ATL.CDBErrorInfo.GetCustomErrorObject", "CDBErrorInfo.GetCustomErrorObject", "ATL::CDBErrorInfo::GetCustomErrorObject", "GetCustomErrorObject",
11+
"GetErrorInfo", "ATL.CDBErrorInfo.GetErrorInfo", "CDBErrorInfo.GetErrorInfo", "ATL::CDBErrorInfo::GetErrorInfo", "CDBErrorInfo::GetErrorInfo",
12+
"ATL.CDBErrorInfo.GetErrorParameters", "CDBErrorInfo::GetErrorParameters", "ATL::CDBErrorInfo::GetErrorParameters", "CDBErrorInfo.GetErrorParameters", "GetErrorParameters",
13+
"CDBErrorInfo.GetErrorRecords", "ATL.CDBErrorInfo.GetErrorRecords", "ATL::CDBErrorInfo::GetErrorRecords", "GetErrorRecords", "CDBErrorInfo::GetErrorRecords"]
814
dev_langs: ["C++"]
9-
helpviewer_keywords: ["CDBErrorInfo class"]
15+
helpviewer_keywords: ["CDBErrorInfo class", "GetAllErrorInfo method", "GetBasicErrorInfo method", "GetCustomErrorObject method", "GetErrorInfo method", "GetErrorParameters method",
16+
"GetErrorRecords method"]
1017
ms.assetid: 9a5c18a2-ee3e-40f5-ab4c-581288d7f737
1118
author: "mikeblome"
1219
ms.author: "mblome"
1320
ms.workload: ["cplusplus", "data-storage"]
1421
---
1522
# CDBErrorInfo Class
16-
Provides support for OLE DB error processing using the OLE DB [IErrorRecords](https://msdn.microsoft.com/en-us/library/ms718112.aspx) interface.
23+
Provides support for OLE DB error processing using the OLE DB [IErrorRecords](https://msdn.microsoft.com/library/ms718112.aspx) interface.
1724

1825
## Syntax
1926

2027
```cpp
2128
class CDBErrorInfo
22-
```
29+
```
30+
31+
## Requirements
32+
**Header:** atldbcli.h
2333
2434
## Members
2535
2636
### Methods
2737
2838
|||
2939
|-|-|
30-
|[GetAllErrorInfo](../../data/oledb/cdberrorinfo-getallerrorinfo.md)|Returns all error information contained in an error record.|
31-
|[GetBasicErrorInfo](../../data/oledb/cdberrorinfo-getbasicerrorinfo.md)|Calls [IErrorRecords::GetBasicErrorInfo](https://msdn.microsoft.com/en-us/library/ms723907.aspx) to return basic information about the specified error.|
32-
|[GetCustomErrorObject](../../data/oledb/cdberrorinfo-getcustomerrorobject.md)|Calls [IErrorRecords::GetCustomErrorObject](https://msdn.microsoft.com/en-us/library/ms725417.aspx) to return a pointer to an interface on a custom error object.|
33-
|[GetErrorInfo](../../data/oledb/cdberrorinfo-geterrorinfo.md)|Calls [IErrorRecords::GetErrorInfo](https://msdn.microsoft.com/en-us/library/ms711230.aspx) to return an **IErrorInfo** interface pointer to the specified record.|
34-
|[GetErrorParameters](../../data/oledb/cdberrorinfo-geterrorparameters.md)|Calls [IErrorRecords::GetErrorParameters](https://msdn.microsoft.com/en-us/library/ms715793.aspx) to return the error parameters.|
35-
|[GetErrorRecords](../../data/oledb/cdberrorinfo-geterrorrecords.md)|Gets error records for the specified object.|
40+
|[GetAllErrorInfo](#getallerrorinfo)|Returns all error information contained in an error record.|
41+
|[GetBasicErrorInfo](#getbasicerrorinfo)|Calls [IErrorRecords::GetBasicErrorInfo](https://msdn.microsoft.com/library/ms723907.aspx) to return basic information about the specified error.|
42+
|[GetCustomErrorObject](#getcustomerrorobject)|Calls [IErrorRecords::GetCustomErrorObject](https://msdn.microsoft.com/library/ms725417.aspx) to return a pointer to an interface on a custom error object.|
43+
|[GetErrorInfo](#geterrorinfo)|Calls [IErrorRecords::GetErrorInfo](https://msdn.microsoft.com/library/ms711230.aspx) to return an `IErrorInfo` interface pointer to the specified record.|
44+
|[GetErrorParameters](#geterrorparameters)|Calls [IErrorRecords::GetErrorParameters](https://msdn.microsoft.com/library/ms715793.aspx) to return the error parameters.|
45+
|[GetErrorRecords](#geterrorrecords)|Gets error records for the specified object.|
3646
3747
## Remarks
3848
This interface returns one or more error records to the user. Call [CDBErrorInfo::GetErrorRecords](../../data/oledb/cdberrorinfo-geterrorrecords.md) first, to get a count of error records. Then call one of the access functions, such as [CDBErrorInfo::GetAllErrorInfo](../../data/oledb/cdberrorinfo-getallerrorinfo.md), to retrieve error information for each record.
3949
40-
## Requirements
41-
**Header:** atldbcli.h
50+
## <a name="getallerrorinfo"></a> CDBErrorInfo::GetAllErrorInfo
51+
Returns all the types of error information contained in an error record.
52+
53+
### Syntax
54+
55+
```cpp
56+
HRESULT GetAllErrorInfo(ULONG ulRecordNum,
57+
LCID lcid, BSTR* pbstrDescription,
58+
BSTR* pbstrSource = NULL,
59+
GUID* pguid = NULL,
60+
DWORD* pdwHelpContext = NULL,
61+
BSTR* pbstrHelpFile = NULL) const throw();
62+
```
63+
64+
#### Parameters
65+
*ulRecordNum*
66+
[in] The zero-based number of the record for which to return error information.
67+
68+
*lcid*
69+
[in] The locale ID for the error information to be returned.
70+
71+
*pbstrDescription*
72+
[out] A pointer to a text description of the error or NULL if the locale is not supported. See Remarks.
73+
74+
*pbstrSource*
75+
[out] A pointer to a string containing the name of the component that generated the error.
76+
77+
*pguid*
78+
[out] A pointer to the GUID of the interface that defined the error.
79+
80+
*pdwHelpContext*
81+
[out] A pointer to the help context ID for the error.
82+
83+
*pbstrHelpFile*
84+
[out] A pointer to a string containing the path to the help file that describes the error.
85+
86+
### Return Value
87+
S_OK if successful. See [IErrorRecords::GetErrorInfo](https://msdn.microsoft.com/library/ms711230.aspx) in the *OLE DB Programmer's Reference* for other return values.
88+
89+
### Remarks
90+
The output value of *pbstrDescription* is obtained internally by calling `IErrorInfo::GetDescription`, which sets the value to NULL if the locale is not supported, or if both of the following conditions are true:
91+
92+
1. the value of *lcid* is NOT U.S. English and
93+
94+
2. the value of *lcid* is NOT equal to the value returned by GetUserDefaultLCID.
95+
96+
## <a name="getbasicerrorinfo"></a> CDBErrorInfo::GetBasicErrorInfo
97+
Calls [IErrorRecords::GetBasicErrorInfo](https://msdn.microsoft.com/library/ms723907.aspx) to return basic information about the error, such as the return code and provider-specific error number.
98+
99+
### Syntax
100+
101+
```cpp
102+
HRESULT GetBasicErrorInfo(ULONG ulRecordNum, 
103+
ERRORINFO* pErrorInfo) const throw();
104+
```
105+
106+
#### Parameters
107+
See [IErrorRecords::GetBasicErrorInfo](https://msdn.microsoft.com/library/ms723907.aspx) in the *OLE DB Programmer's Reference*.
108+
109+
### Return Value
110+
A standard HRESULT.
111+
112+
## <a name="getcustomerrorobject"></a> CDBErrorInfo::GetCustomErrorObject
113+
Calls [IErrorRecords::GetCustomErrorObject](https://msdn.microsoft.com/library/ms725417.aspx) to return a pointer to an interface on a custom error object.
114+
115+
### Syntax
116+
117+
```cpp
118+
HRESULT GetCustomErrorObject(ULONG ulRecordNum, 
119+
REFIID riid,IUnknown** ppObject) const throw();
120+
```
121+
122+
#### Parameters
123+
See [IErrorRecords::GetCustomErrorObject](https://msdn.microsoft.com/library/ms725417.aspx) in the *OLE DB Programmer's Reference*.
124+
125+
### Return Value
126+
A standard HRESULT.
127+
128+
## <a name="geterrorinfo"></a> CDBErrorInfo::GetErrorInfo
129+
Calls [IErrorRecords::GetErrorInfo](https://msdn.microsoft.com/library/ms711230.aspx) to return an [IErrorInfo](https://msdn.microsoft.com/library/ms718112.aspx) interface pointer to the specified record.
130+
131+
### Syntax
132+
133+
```cpp
134+
HRESULT GetErrorInfo(ULONG ulRecordNum, 
135+
LCID lcid,IErrorInfo** ppErrorInfo) const throw();
136+
```
137+
138+
#### Parameters
139+
See [IErrorRecords::GetErrorInfo](https://msdn.microsoft.com/library/ms711230.aspx) in the *OLE DB Programmer's Reference*.
140+
141+
### Return Value
142+
A standard HRESULT.
143+
144+
## <a name="geterrorparameters"></a> CDBErrorInfo::GetErrorParameters
145+
Calls [IErrorRecords::GetErrorParameters](https://msdn.microsoft.com/library/ms715793.aspx) to return the error parameters.
146+
147+
### Syntax
148+
149+
```cpp
150+
HRESULT GetErrorParameters(ULONG ulRecordNum, 
151+
DISPPARAMS* pdispparams) const throw();
152+
```
153+
154+
#### Parameters
155+
See [IErrorRecords::GetErrorParameters](https://msdn.microsoft.com/library/ms715793.aspx) in the *OLE DB Programmer's Reference*.
156+
157+
### Return Value
158+
A standard HRESULT.
159+
160+
## <a name="geterrorrecords"></a> CDBErrorInfo::GetErrorRecords
161+
Gets error records for the specified object.
162+
163+
### Syntax
164+
165+
```cpp
166+
HRESULT GetErrorRecords(IUnknown* pUnk, 
167+
const IID& iid, 
168+
ULONG* pcRecords) throw();
169+
170+
171+
HRESULT GetErrorRecords(ULONG* pcRecords) throw();
172+
```
173+
174+
#### Parameters
175+
*pUnk*
176+
[in] Interface to the object for which to get error records.
177+
178+
*iid*
179+
[in] The IID of the interface associated with the error.
180+
181+
*pcRecords*
182+
[out] A pointer to the (one-based) count of error records.
183+
184+
### Return Value
185+
A standard HRESULT.
186+
187+
### Remarks
188+
Use the first form of the function if you want to check which interface to get the error information from. Otherwise, use the second form.
42189
43190
## See Also
44191
[DBViewer](../../visual-cpp-samples.md)

docs/data/oledb/cdberrorinfo-getallerrorinfo.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/data/oledb/cdberrorinfo-getbasicerrorinfo.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/data/oledb/cdberrorinfo-getcustomerrorobject.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)