You are working with a SqlDataReader to fetch data from a SELECT statement. What should you consider when iterating through the result set?

  • Check for null values
  • Close the connection after iteration
  • Read data in sequential order
  • Use asynchronous methods
The correct option is Read data in sequential order. When working with a SqlDataReader, it's essential to iterate through the result set in a sequential manner using methods like Read(). This allows you to retrieve each row of data one at a time, which is efficient for processing large result sets without loading the entire data into memory at once.
Add your answer
Loading...

Leave a comment

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