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

前端 未结 6 1838
孤城傲影
孤城傲影 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:41

    In classic ADO the RecordSet object could work both in connected and disconnected mode. In Ado.Net there are two separate types available to cater to each of these scenarios - IDataReader and DataSet

    Connected Mode: remains connected to the underlying data source while traversing in a forward-only streams of result sets.

    Disconnected Mode: the resultset retrieved is kept in memory and the connection to the DB is no longer needed for traversal.

    This MSDN article further compares the two objects and discusses their individual merits a lot better than I will be able to explain here.

提交回复
热议问题