Article ID: 307512 - View products that this article applies to.
This article was previously published under Q307512
The GetSchemaTable method of the SqlDataReader object returns columns, the BaseServerName and BaseCatalogName properties. However, SqlDataReader.GetSchemaTable should only return BaseCatalogName.
In addition to the columns that are described in the Microsoft .NET Framework Class Library Software Development Kit (SDK) documentation, SqlDataReader.GetSchemaTable returns a column named BaseServerName. BaseServerName is the name of the Microsoft SQL Server instance that SqlDataReader uses. BaseServerName appears before BaseCatalogName in the DataTable that describes the column metadata.
Because this problem does not occur with the OleDbDataReader object, you can use OleDbDataReader to obtain the SchemaTable information.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Steps to Reproduce the Behavior
Using Visual Basic .NET
Using Visual C# .NET
Using Visual C++ .NET
Using Visual J# .NET
Article ID: 307512 - Last Review: December 3, 2007 - Revision: 1.18