PrepAway - Latest Free Exam Questions & Answers

Which type of object should you use in the method?

You need to write a method that retrieves data from a Microsoft Access 2013 database. The method
must meet the following requirements:
Be read-only.
Be able to use the data before the entire data set is retrieved.
Minimize the amount of system overhead and the amount of memory usage.
Which type of object should you use in the method?

PrepAway - Latest Free Exam Questions & Answers

A.
DbDataAdapter

B.
unTyped DataSet

C.
OleDbDataAdapter

D.
DbDataReader

Explanation:
The DbDataReader class reads a forward-only stream of rows from a data source.

DbDataReader Class
https://msdn.microsoft.com/en-us/library/system.data.common.dbdatareader(v=vs.110).aspx

9 Comments on “Which type of object should you use in the method?

  1. bilekas says:

    Correct answer: DbDataReader

    OLEDBDataAdapter is the one which gives Flexibility to edit/Delete/insert the data. In comparision with DataReader you would find a DataAdapter slower.




    0



    0

Leave a Reply