Article ID: 217183 - Last Review: August 15, 2005 - Revision: 3.1 FIX: GetPropertyInfo Not Returning Correct Values for Default CaseThis article was previously published under Q217183 On This PageSYMPTOMS
After creating an OLE DB Provider with the ATL Wizard in Visual C++ 6.0, the IDBProperties::GetPropertyInfo returns all of the DATASOURCEINFO properties rather than the initialization properties; also, the GUID returned in the DBPROPINFOSET structure is DBPROPSET_DBINITALL.
CAUSE
This problem is caused by a bug in IDBPropertiesImpl::GetPropertyInfo(), implemented in the ATL OLE DB header file Atldb.h.
RESOLUTION
Install Visual Studio Service Pack 3 to get a corrected version of Atldb.h.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why (http://support.microsoft.com/kb/194022/EN-US/ ) 194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed (http://support.microsoft.com/kb/194295/EN-US/ ) MORE INFORMATION
According to the OLE DB documentation:
If cPropertyIDSets is zero, the provider ignores rgPropertyIDSets. When called on the enumerator, the provider returns information about all properties in the Initialization property group. When called on the data source object, if the data source object has not been initialized, the provider returns information about all properties in the Initialization property group. Also regarding the GUID returned in DBPROPINFOSET and the special GUIDs like DBPROPSET_DBINITALL: These GUIDs are not returned in the guidPropertySet element of the DBPROPINFOSET structures returned in rgPropertyInfoSets. Instead, the GUID of the property set to which the property belongs is returned. Steps to Reproduce Behavior
APPLIES TO
| Article Translations
|
Back to the top
