How To Take This Class

Course Overview

In this ADO.NET Using Visual Studio 2005 Training course, students will learn about the features provided by ADO.NET 2.0, including how to connect to data sources, retrieve and manipulate data, and perform data updates. Students will also examine the various ADO.NET classes, including Connection, Command, DataReader, DataSet, DataTable, DataRelation, and more. Students will see how to apply constraints and relationships to disconnected data and learn how to update data, including how to handle stored procedures, parameters, and return values as well as how to search, sort, and filter data stored in a DataSet or DataTable. Students will also become familiar with strongly typed DataSets and learn their advantages and see how to leverage the power of XML through serialization, Diffgrams,and the XMLDataDocument object. Finally students will examine new ADO.NET features that support SQL Server 2005 technologies, including asynchronous commands, Multiple Active Result Sets, bulk inserts , and more. This course can be delivered in Visual Basic or Visual C# to accommodate a student's language preferences.

Course Prerequisites

This course assumes that students have some familiarity with Visual Studio 2005, the .NET Framework, and the fundamentals of programming with Visual Basic or C#.

Course Audience

This course is designed for .NET developers who are looking to gain a deeper understanding of ADO.NET and it's use in applications.

What You'll Learn

Upon successful completion of this course, students will be able to:
  • Connect to multiple types of data sources, including SQL Server and Microsoft Jet/Access
  • Retrieve data, using the DataAdapter, Command, and DataReader classes
  • Create and configure Command parameters
  • Cache data using the DataTable and DataSet classes
  • Apply constraints to DataTable and DataColumn objects
  • Create relations between DataTable objects, using the DataRelation class
  • Update data using DataAdapter and Command classes
  • Work with strongly typed DataSet and DataTable classes
  • Retrieve and update data using TableAdapter classes
  • Handle exceptions and data errors, including concurrency errors
  • Search, sort, and filter data using the DataView class
  • Work with auto-increment columns in multi-user applications
  • Retrieve and generate XML data
  • Take advantage of new SQL Server 2005 features

Course Duration

3 Days

Course Outline

  1. Accessing Data with ADO.NET
    • The ADO.NET Object Model
    • Connecting to Data
    • Understanding Connection Pooling
    • Using Provider Statistics
  2. Retrieving Data
    • Introducing Command Classes
    • Working with Data Readers
    • Digging Deeper into Commands and DataReaders
  3. Caching Data in DataSets
    • DataSets and DataTables
    • Populating a DataTable
    • Filling DataSets Using a DataAdapter
    • Retrieving Schema Information
    • DataSets and XML
  4. Applying Constraints
    • Primary Keys and Unique Constraints
    • Foreign Key Constraints
    • Column-Based Constraints
  5. Data Relations
    • Creating DataRelations
    • Navigation Pathways
    • Expressions and Relations
    • Specifying XML Nesting
  6. Updating Data
    • Creating Commands with CommandBuilders
    • Creating Custom Commands
    • Using Stored Procedures
    • Performing Batch Updates
  7. Using Strongly Typed DataSet Classes
    • Using a Loosely Typed DataSet
    • Creating a Strongly Typed DataSet
    • Using a Strongly Typed DataSet
    • Issues with Using a Strongly Typed DataSet
  8. Handling Exceptions and Data Errors
    • Using Structured Exception Handling
    • Handling Provider Errors
    • Using Transactions
    • Handling Concurrency Conflicts
  9. Searching, Sorting, and Filtering
    • The Sample Project
    • Working with DataTables
    • Working with DataViews
  10. Handling AutoIncrement Columns
    • The AutoIncrement Property
    • Retrieving New Database Values
    • Avoiding Multi-User Conflicts
    • Merging Inserted Rows
    • Other Considerations
  11. XML Techniques
    • ADO.NET and XML
    • Saving DataSet Data as XML
    • Loading XML Data into a DataSet
    • Working with DataSets and XML Together
    • Working with XML Data in SQL Server
  12. Supporting SQL Server 2005 Features
    • Optimizing Performance
    • Easing Application Development