Chapter 12Advanced Data Access
In the last three chapters, you learned some of the important concepts
of data access and presentation. You learned how to use the
SqlConnection
class to establish a connection to the
database, you learned how to use the SqlCommand
class
to execute a query on a database table, and you learned how to return the
results of the command into an SqlDataReader
for use
within the application.
In this chapter, we’ll discuss the alternatives to using the
SqlDataReader
object for retrieving
data from your database. For starters, it’s important to understand that
SqlDataReader
has both advantages and disadvantages.
The two main points you need to keep in mind about
SqlDataReader
are:
-
It represents the fastest method available ...
Get Build Your Own ASP.NET 4 Web Site Using C# & VB, 4th Edition 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.