GetSchemaTable() is in error or incomplete

  • Thread starter Thread starter Juan Dent
  • Start date Start date
J

Juan Dent

Hi,

I am perplexed at the inaccuracy and incompleteness of the
IDataReader.GetSchemaTable method. It is supposed to
return a lot of column metadata about a IDataReader but it
actually returns quite a lot less and often returns
erroneous values.

Why is this? I have tried the SqlDataReader and the
OleDbDataReader and not only do they produce the mentioned
behavior but even worse: the values returned are
different!! I even think the columns returned are not the
same.

Am I missing something or is ADO.NET lacking a reliable
and complete method for accessing a query's metadata?

Thanks,
Juan Dent
 
Some suggestions:

1. Change the database to test this problem:

2. Change the data access driver (OLEDB or SQL) to test this problem.

3. How did you implement the code? The following article includes a sample
code. You can test it at first:

=================
309683.KB.EN-US HOW TO: Retrieve Column Schema by Using the DataReader
GetSchemaTable
http://support.microsoft.com/default.aspx?scid=KB;EN-US;309683
====================


Sincerely,

Kevin
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! - www.microsoft.com/security

--------------------
| Content-Class: urn:content-classes:message
| From: "Juan Dent" <[email protected]>
| Sender: "Juan Dent" <[email protected]>
| Subject: GetSchemaTable() is in error or incomplete
| Date: Fri, 3 Oct 2003 15:43:19 -0700
| Lines: 19
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOJ/74c9BRsyp0NTd2Iw3sQoa+oWQ==
| Newsgroups: microsoft.public.dotnet.framework.adonet
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:62805
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| Hi,
|
| I am perplexed at the inaccuracy and incompleteness of the
| IDataReader.GetSchemaTable method. It is supposed to
| return a lot of column metadata about a IDataReader but it
| actually returns quite a lot less and often returns
| erroneous values.
|
| Why is this? I have tried the SqlDataReader and the
| OleDbDataReader and not only do they produce the mentioned
| behavior but even worse: the values returned are
| different!! I even think the columns returned are not the
| same.
|
| Am I missing something or is ADO.NET lacking a reliable
| and complete method for accessing a query's metadata?
|
| Thanks,
| Juan Dent
|
 
Back
Top