What is exactly meaning of disconnected and connected approach in ADO.NET

前端 未结 6 1824
孤城傲影
孤城傲影 2021-02-06 09:31

I am learning ADO.Net. I read this line:-

DataReader is \"connected\" approach and dataset is \"disconnected\" approach

From this

6条回答
  •  礼貌的吻别
    2021-02-06 09:46

    Think DataSet as in memory database, it contains DataTables and contain tables data (all or subset of data based on Select query) and even maintain relations among tables. On the DataSet you can perform update/delete operations, it will be synched to database through DataAdapter object. so to display data it does not need to be connected to database All time as DataReader, which needs to be connected to database whenever you want to display data.

提交回复
热议问题