Scenario: You need to read data from a large SQL Server database. Which ADO.NET data reader should you use, and why?

  • DbDataReader
  • OleDbDataReader
  • OracleDataReader
  • SqlDataReader
SqlDataReader provides the most efficient way to read data from a SQL Server database due to its optimized design specifically for SQL Server. It provides a forward-only, read-only stream of data, reducing memory consumption and increasing performance when dealing with large datasets. OleDbDataReader is used for OLE DB data sources, OracleDataReader is specific to Oracle databases, and DbDataReader is the base class for all ADO.NET data readers, providing more generic functionality.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *