Hi
Define relationship between DataReader and DataSet?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vilas GitePosted Sep 28, 2011, 4:50 AM
Hi Rajesh..
Refer:
Our Recommended Articles…
http://www.c-sharpcorner.com/UploadFile/61b832/4102/
Thanks!
----------------------------------------------------------------------
If this reply helps your post…then check "This is correct answer"
Prabhu RajaPosted Sep 28, 2011, 2:42 AM
DataSet
When the use of this DataSet is finished, changes can be made back to the central database for updating. The data in DataSet can be loaded from any valid data source like Microsoft SQL server database, an Oracle database or from a Microsoft Access database.
The SqlCommand.ExecuteReader method returns a SqlDataReader object, and the OleDbCommand.ExecuteReader method returns an OleDbDataReader object. The DataReader can provide rows of data directly to application logic when you do not need to keep the data cached in memory. Because only one row is in memory at a time, the DataReader provides the lowest overhead in terms of system performance but requires the exclusive use of an open Connection object for the lifetime of the DataReader.
For more Reference : use MSDN Documentation in ADO.Net
Thank You
Satyapriya NayakPosted Sep 28, 2011, 12:59 AM
DataReader represents only one database record at a time. You must call the Read() method to fetch each new record from the underlying database table into memory. Each time you call Read() again, the previously fetched record is lost. DataSet is on the other hand, enables you to represent the results of a database query in your server's memory. Because a DataSet provides you with a memory-resident representation of data, you can work with the results of a database query as a whole. DataReader must remain connected to a database table. A DataReader is tied down to its underlying data source. The DataSet object is central to supporting disconnected, and distributed data scenarios with ADO.NET.
The DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the data source. It might be helpful to think of a DataReader as a forward-only recordset. A DataSet, on the other hand, is similar to a disconnected, client-side, static recordset. DataSets also require more overhead to create and populate than DataReaders.
Thanks
Hemant KumarPosted Sep 28, 2011, 12:35 AM
Just check out this article.
http://www.dotnetspider.com/qa/Question1306.aspx
Hope it helps.