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.

BUG: IDBSchemaRowset::GetRowset Returns Wrong Table Catalog Name Using SQLOLEDB with Server Cursor


View products that this article applies to.

This article was previously published under Q294132

↑ Back to the top


Symptoms

If you call IDBSchemaRowset::GetRowset using SQLOLEDB and a Server cursor (using DBPROP_SERVERCURSOR), you may receive an incorrect Table Catalog name.

↑ Back to the top


Resolution

You can work around this problem by not using a server cursor if you are going to use the Table Catalog information in your application.

This problem only affects the Table Catalog information. All other information returned by IDBSchemaRowset will be from the requested database regardless of cursor location.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Using RowsetViewer, establish an OLEDB session with SQL Server. Make sure that the current catalog for that session is the master database.
  2. Invoke the IDBSchemaRowset::GetRowset function from the Session menu.
  3. Select rguidSchema = DBSCHEMA_TABLES from the drop down list.
  4. Type "pubs" in the TABLE_CATALOG field.
  5. Click Properties.
  6. Set DBPROP_SERVERCURSOR to TRUE.
  7. Make sure that Use restriction and use properties are selected. The resultset will contain information from the pubs database but the TABLE_CATALOG column will show "master".

↑ Back to the top


Keywords: KB294132, kbpending, kbbug

↑ Back to the top

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