"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%(E-Mail Removed)...
> Hi Edward,
>
> If you look at classes that implement IDataReader, you'll see that they
> also implement IDataRecord.
But classes which implement IDataReader are not generic. They are specific
to a particular implementation such as Oracle, SqlServer, OleDb, or Odbc.
That was my entire point of asking why IDataReader does not have a function
which returns an IDataRecord. Then implementation classes which implement
IDataReader could return their own version of IDataRecord. This would make
the IDataReader generic rather than specific to an implementation since
IDataRecord is generic enough to be used, as is, to return column values.
Nearly all other interfaces in ADO .NET can be treated generically in such a
way, with only a very small amount of implementation specific functionality
added for classes which implement the interface. Only IDataReader, among the
major interfaces, can not. One simply can not use IDataReader to get a row,
and therefore the values of the columns of that row, without using instead a
specific class which implements it.
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> SLODUG - Slovene Developer Users Group
> www.rthand.com
>
> "Edward Diener" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I would have expected an IDataReader to be able to return an IDataRecord
>>from some interface function for the current row, to allow one to fetch
>>the row and its values generically. But I did not find such functionality.
>>Did I miss it ? Why is IDataReader not designed as generically as the
>>other ADO .NET interfaces ?
>>
>
>