DataSet & DataReader - Functions,Properties - ADO.NET

Q.  The three statements are given below about DataSet and DataReader, choose the correct option according to the statement.

Statement 1: DataSet Provides Disconnected environment but DataReader provides Connected environment.
Statement 2: DataSet Provides Connected environment but DataReader provides Disconnected environment.
Statement 3: DataSet Can store multiple table simultaneously but DataReader Supports a single table based on a single SQL query.

- Published on 28 Jul 15

a. Only Statement 1 is correct.
b. Statement 1 and 2 is correct.
c. Statement 2 and 3 is correct.
d. Statement 1 and 3 is correct.

ANSWER: Statement 1 and 3 is correct.
 

    Discussion

  • Ramesh   -Posted on 19 Oct 15
    Important properties of Dataset
    • Dataset provides diconnected environment.
    • It is collection of datatable means it can contain more than one table simultaneously.
    • You can create Data Relations between these tables within the DataSet.
    • There is no need of active connections during work with datasets.
    • DataSet provides features like saving data as XML and loading XML data.
    Important properties of Datareader
    • Datareader provides connected architecture.
    • It is a read only and forward only object.
    • It reads one record at a time
    • It fetches the data very fast compared with dataset.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)