Professional ASP.NET 1.1 [Electronic resources]

Alex Homeret

نسخه متنی -صفحه : 243/ 201
نمايش فراداده

l xmlns="http://www.w3.org/1999/l">

  • Use a DataReader Instead of a DataSet

    In general, the only times that a DataSet must be used in preference to a DataReader are:

    • When the data will be remoted (that is, sent as a disconnected package) to the client or a remote instance of the application or a component–for example, when using a web service that returns a DataSet.

    • When you need to retrieve and store more than one set of rows, and, optionally, the relationships between them.

    A DataReader can be used as the source for data binding controls if required.