BUG: The GetSchemaTable method of the SqlDataReader object returns the wrong column name (307512)
The information in this article applies to:
- Microsoft ADO.Net 2.0
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft ADO.NET (included with the .NET Framework 1.1)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C# .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual J# .NET 2002
- Microsoft .NET Framework
- Microsoft Windows .NET Framework 1.1
- Microsoft .NET Framework 2.0
- Microsoft Visual Basic 2005
- Microsoft Visual C++ 2005 Express Edition
- Microsoft Visual C# 2005
- Microsoft Visual J# 2005 Express Edition
This article was previously published under Q307512 SYMPTOMS The GetSchemaTable method of the SqlDataReader object
returns columns, the BaseServerName and BaseCatalogName properties. However,
SqlDataReader.GetSchemaTable should only return BaseCatalogName. CAUSE 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. RESOLUTION Because this problem does not occur with the OleDbDataReader object, you can use OleDbDataReader to obtain the SchemaTable information. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 10/4/2006 |
---|
Keywords: | kbtshoot kbvs2002sp1sweep kbbug kbpending kbreadme kbSqlClient kbSystemData KB307512 kbAudDeveloper |
---|
|