Data Reader Characteristics

As mentioned yesterday, data readers represent one of the two programming models exposed in ADO.NET that work with data (the other being the DataSet, which works with disconnected results). As a developer, you need to choose which programming model you're going to use for a particular scenario. To help you understand the differences and when a data reader might be appropriate, consider the following characteristics:

  • Connectedness. Because the data reader exposes a connected and streamed model, unlike the DataSet, its uses are relegated to situations in which your application can maintain the connection to the data store while the data is being traversed. If you know, for example, that the data must be used offline, ...

Get Sams Teach Yourself ADO.NET in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.