ADO.Net Offers two objects to Read data from the Data source. One is DataReader and Another one is DataSet.
DataReader
DataReader
is an object used for reading data sequentially. The DtaReader is
Read-Only,That means you can not modify data using DataReader. You can
read the data in forward-only manner. DataReader can read one record at a
time. The forward only design enables Data access faster.
NameSpace to use DataReader
System.Data.SqlClient /*For SqlServer*/
System.Data.OleDb /*For OleDb Connection*/
System.Data.OracleClient /*For Oracle*/
Example of DataReader
DataSet
DataSet
is a core of ADO.Net disconnected architecture and is used to store
data in a disconnected state. It's actually a collection of one or more
data objects, Usually presented in tabular format. It's Fully supports
XML so that XML document can be read into DataSet or a DataSet can be
exported to XML.
NameSpace to use DataSet
System.Data
No comments:
Post a Comment