Article ID: 217183 - View products that this article applies to.
This article was previously published under Q217183
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.
This problem is caused by a bug in IDBPropertiesImpl::GetPropertyInfo(), implemented in the ATL OLE DB header file Atldb.h.
Install Visual Studio Service Pack 3 to get a corrected version of Atldb.h.
Microsoft 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
194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
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
Article ID: 217183 - Last Review: August 15, 2005 - Revision: 3.1
Contact us for more help
Connect with Answer Desk for expert help.