Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to c# .I found a new interface IDataReader while reading in a book.I didnt understood use of that interface.Can any one explain about this interface.Thanks In Advance.
Posted

You wouldn't normally use it - it is the interface which is implemented by the various DataReaders - SqlDataReader, MySqlDataReader, and so on which access database data.

If you are new to C#, then I would just ignore it at present - I have never used it, and I'm not a beginner!
 
Share this answer
 
Comments
Prashant Bangaluru 26-Jul-12 5:18am    
Thanks I got little info on that.But I have seen in a project.So I showed interest in it.If you have any example please post the same.
As per msdn "Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a data source, and is implemented by .NET Framework data providers that access relational databases."

This interface provides some common properties / methods that are then used in various database specific implementations of this interface.

For e.g. the SQLDataReader[^] provides an implementation specific to SQL Server.

A few data readers are listed below. You can refer MSDN for details on any of these -
System.Data.DataTableReader
System.Data.EntityClient.EntityDataReader
System.Data.Odbc.OdbcDataReader
System.Data.OleDb.OleDbDataReader
System.Data.OracleClient.OracleDataReader
System.Data.SqlClient.SqlDataReader
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900