IErrorInfo::GetSource

OLE DB Programmer's Reference

Returns the name of the component that generated the error, such as "ODBC <driver-name>".

HRESULT GetSource (    BSTR *pbstrSource);

Parameters

pbstrSource
[out]
A pointer to memory in which to return a pointer to the name of the component that generated the error. If an error occurs, *pbstrSource is set to a null pointer. The memory for this string is allocated by the provider and must be freed by the consumer with a call to SysFreeString.

Return Code

S_OK
The method succeeded.
E_INVALIDARG
pbstrSource was a null pointer.
E_OUTOFMEMORY
The provider was unable to allocate sufficient memory in which to return the component name.
DB_E_NOLOCALE
The locale ID specified by the lcid parameter in IErrorRecords::GetErrorInfo was not supported by the provider.

Comments

The implementation of this method shipped with the MDAC SDK calls IErrorLookup::GetErrorDescription to retrieve the error source.

See Also

IErrorLookup::GetErrorDescription

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net