FIX: GetPropertyInfo Not Returning Correct Values for Default CaseID: 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 this to be a bug in the Microsoft products 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:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 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.
Additional query words:
Keywords : kbservicepack kbATL kbDatabase kbProvider kbVC600 kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbGrpVCDB
Version : WINDOWS:6.0,6.0 SP3; winnt:6.0
Platform : WINDOWS winnt
Issue type : kbbug
Last Reviewed: May 19, 1999