Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: MSDASQL Incorrectly Matches Parameter Names with an Empty String


View products that this article applies to.

This article was previously published under Q306744

↑ Back to the top


Symptoms

When the Microsoft OLE DB Provider for ODBC Drivers (MSDASQL) calls IDBSchemaRowset::GetRowset to retrieve DBSCHEMA_PROCEDURE_PARAMETERS with the PARAMETER_NAME restriction set to an empty string, the provider may incorrectly match the empty string with some parameter name and return rows instead of an empty rowset.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

Steps to Reproduce Behavior

To reproduce this behavior, use the RowsetViewer tool (which ships with the Microsoft Data Access SDK 2.6) to connect to an ODBC data source by way of the Microsoft OLEDB Provider for ODBC drivers (MSDASQL).
  1. From the Session menu, invoke IDBSchemaRowset and GetRowset.
  2. On the invoked dialog box, select DBSCHEMA_PROCEDURE_PARAMETERS from the drop-down list under the Schema tab.
  3. The first three restrictions should be VT_EMPTY while the fourth, PARAMETER_NAME, VT_BSTR, should be set to <Empty String> by selecting it from the drop-down list.
  4. Click OK.
Some rows are displayed. An empty rowset is the expected result because the provider should not find any procedure that has parameters with an empty string.

↑ Back to the top


Keywords: KB306744, kbprb

↑ Back to the top

Article Info
Article ID : 306744
Revision : 3
Created on : 5/12/2003
Published on : 5/12/2003
Exists online : False
Views : 299