FIX: Default Schema Rowsets Do Not Return NULL ColumnsID: Q217186
|
When you retrieve a schema rowset from an OLE DB provider created using the ATL OLE DB Provider Wizard, the TABLE_CATALOG and TABLE_SCHEMA columns return a status of DBSTATUS_S_OK and a zero length DBTYPE_WSTR value. According to the OLE DB specification 2.0. If a provider does not support the IDBInfo interface (and a default ATL OLE DB Provider Wizard generated OLE DB provider does not), then the provider must return DBSTATUS_S_ISNULL for all TABLE_CATALOG and TABLE_SCHEMA columns in schema rowsets.
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
The following information is taken from the OLE DB Programmer's Reference, Appendix B Schema Rowsets.
"If a provider returns non-NULL CATALOG or SCHEMA column values in schema rowsets, it must support IDBInfo to describe how a fully qualified name is assembled. A provider that does not support IDBInfo must return NULL values for CATALOG and SCHEMA columns in all schema rowsets."
Since an ATL OLE DB Provider Wizard generated OLE DB provider does not support the IDBInfo interface, it does not follow the OLE DB specification when it returns zero length strings in the TABLE_CATALOG and TABLE_SCHEMA schema rowset columns.
You can test a particular ATL OLE DB Provider as seen below, by using the RowsetViewer tool that ships with the Microsoft Data Access SDK 2.0.
The Microsoft Data Access SDK 2.1 Online Documentation: Microsoft OLE DB; OLE DB Programmer's Reference; Part 3 Appendixes; Appendix B Schema Rowsets.
Additional query words:
Keywords : kbservicepack kbATL kbOLEDB kbProvider kbVC600 kbVC600bug kbVS600sp2 kbVS600SP1 kbVS600sp3fix
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 19, 1999