471,330 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

SqlDataReader & IEnumerable


SqlDataReader and OleDbDataReader support IEnumerable interface. When I
looked up IEnumerable.GetEnumerator for SqlDataReader, it says the following:

This member supports the .NET framework infrastructure and is not intended
to be used directly from your code.

What does this mean? It works, but you can't use it?

Is there a way to enumerate the resulting rows using the interfaces? Here,
I want to return the IEnumerator interface for processing. This way, it
doesn't matter if the data is coming from SQL server or Oracle.

public IEnumerator GetItems( ... )



Be Cool!
Jul 25 '05 #1
1 3452
If you want to make your data access code provider agnostic use
IDbConnection, IDataReader etc.


Jul 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by PawelR | last post: by
2 posts views Thread by Marc | last post: by
1 post views Thread by thejackofall | last post: by
22 posts views Thread by Adam Clauss | last post: by
3 posts views Thread by Wiktor Zychla [C# MVP] | last post: by
6 posts views Thread by Andrew Matthews | last post: by
2 posts views Thread by =?Utf-8?B?a2VubmV0aEBub3NwYW0ubm9zcGFt?= | last post: by
9 posts views Thread by timor.super | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.