Summary

In this chapter, you began your exploration of ADO.NET's data-management objects. Here's what you learned:

  • The DataReader (OleDbDataReader or SqlDataReader) is great at retrieving data quickly and efficiently. Because it only provides forward-only, read-only access to data (and in many cases, you must retrieve columns in a particular order), it can make your work a little harder when coding. But you will find that the performance benefits are well worth the extra coding you may have to do. A DataSet is made up of one or many DataTable objects, and you can set relationships between these data tables. You may also want to add primary keys to each data table so that you can search within the tables later on.

  • You can use a DataRelation object to allow you to retrieve multiple related data tables and look up child rows based on a selected parent row. This allows you to make one request for data to the database server but show specific data from the data tables on request.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.226.66