Microsoft KB Archive/294132

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

Article ID: 294132

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q294132



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



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.



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



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 &quot;pubs&quot; 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 &quot;master&quot;.

Keywords: kbbug kbpending KB294132

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.