Pros and cons and Usage
I have been preparing myself for an interview for the post of software developer in .net platform. For database related issues, I have to to a point about the connected ans disconnected classes of ADO .NET. I have read several articles but still not getting a perfect picture of those two terms. Hence, here I am, to the best place to get a concrete ans. Can 开发者_StackOverflow中文版any one explain me the pros and cons and the usage scenarios?
A DataReader uses a connected architecture since it keeps conneection open until all records are fetched.
A DataSet uses a disconnected architecture since it reads all records at once and closes connection afterwards, and the records are available after the connection is closed.
http://www.sitepoint.com/dataset-datareader
精彩评论