Friday 3 May 2013

How to handle multiple data tables using Data Reader in ASP.NET


This is best used when you just want to fetch data in read only mode , populate your business entity and close the reader. This is really fast. But you cannot do update with data reader.


Data reader can hold data from multiple tables and data reader can hold more than one table.


If you want to Read/Update the data, You can Read/Update the data with data adapters but it is less faster when reading the data then Data reader.

When you read the results of a batch SQL statement, you can use the NextResult method to position the DataReader at the next result in the result set.


do check like

if(reader.NextResult())


By default, the data reader is positioned on the first result.


1 comment:

  1. Casinos Near Me - MGM Grand Hotel and Casino in - JT Hub
    Get the best deals 서울특별 출장마사지 on hotels near me in 충주 출장샵 2021 from JTG Hub in 서울특별 출장마사지 Maricopa, AZ. Find the best 밀양 출장마사지 deal and packages with 영주 출장마사지 JTG at the best

    ReplyDelete