You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
17
24
18
25
## Syntax
19
26
20
27
```cpp
21
28
classCDBErrorInfo
22
-
```
29
+
```
30
+
31
+
## Requirements
32
+
**Header:** atldbcli.h
23
33
24
34
## Members
25
35
26
36
### Methods
27
37
28
38
|||
29
39
|-|-|
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.|
36
46
37
47
## Remarks
38
48
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.
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.
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*.
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*.
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.
0 commit comments