Exclusive
Visual Studio

Accessing Data with Microsoft Visual C++ 6
(Microsoft Training Course: 1595) - 3 days - £1700 exc VAT



> Target Audience
THIS COURSE HAS NOW RETIRED. PLEASE SEE THE SUPPLEMENTARY INFORMATION FOR DETAILS OF ALTERNATIVE COURSES.
This will teach Microsoft Visual C++ programmers to use Microsoft technologies such as Microsoft ActiveX Data Objects (ADO), OLE DB templates, and Microsoft Foundation Class Open Database Connectivity (MFC ODBC) classes, to build applications and components that access data sources.
> Course outline
  1. Data Access Strategies
  2. Introduction to ODBC
  3. Using the MFC ODBC Classes
  4. Introduction to OLE DB
  5. OLE DB Consumer Templates
  6. Executing Dynamic Queries with OLE DB
  7. Executing Parameterized Queries with OLE DB
  8. Introduction to ActiveX Data Objects
  9. Using ActiveX Data Objects
  10. Parameterized Queries and Error Handling

Supplementary InformationThis course has now retired and is no longer available. We suggest you look at Course [[{http://www.F1Comp.Co.UK/computer_training/Microsoft_Training_Courses/Visual-Studio-.Net/2124.aspx}2124: Programming with C#.]]
Module 1: Data Access Strategies
  • Microsoft Strategy for Universal Data Access
  • Data Access Terminology
  • Additional References
Skills
  • Explain the benefits of Universal Data Access.
  • Explain the role of ODBC, OLE DB, and ADO.
  • Define the terms transaction, cursor, and stored procedure.
  • Differentiate between client-side and server-side cursors.
top
Module 2: Introduction to ODBC
  • ODBC Architecture
  • Registering an ODBC Data Source
Skills
  • Identify the elements of the ODBC Architecture.
  • Register a data source by using the ODBC Administrator.
  • Register a data source by using the ODBC Application Programming Interface (API).
top
Module 3: Using the MFC ODBC Classes
  • MFC ODBC Database Classes
  • Building MFC ODBC Applications
  • Adding, Deleting, and Editing Records
  • Debugging and Error handling
  • Best Practices
  • Lab: Calling Stored Procedures
  • Lab: Building a Simple Database Application
top
Module 4: Introduction to OLE DB
  • Benefits of OLE DB
  • Types of OLE DB Applications
  • OLE DB Architecture
  • OLE DB Physical Architecture
Skills
  • List the benefits of using the OLE DB technology for data access.
  • List the types of OLE DB applications.
  • Describe the role of OLE DB components in data access.
  • Describe the OLE DB resource pooling mechanism.
  • Describe the OLE DB physical architecture.
top
Module 5: OLE DB Consumer Templates
  • Introduction to OLE DB Templates
  • Using the Consumer Template Classes
  • Accessing a Data Source from an MFC Application
  • Changing a Rowset
  • Data Links
  • Lab: Creating an OLE DB Consumer Application
  • Lab: Creating an OLE DB Consumer Component
Skills
  • Explain the role of the OLE DB consumer template classes.
  • Use the MFC AppWizard to build applications that retrieve, add, delete, and edit records in a data source by using multiple accessors.
  • Use the Active Template Library (ATL) AppWizard to build components that retrieve and update records in a data source by using the CAccessor class.
top
Module 6: Executing Dynamic Queries with OLE DB
  • Retrieving Schema Information
  • Retrieving Data Using Dynamic Queries
  • Handling OLE DB Errors
  • Lab: Handling Dynamic Queries
  • Lab: Using the CManualAccessor
Skills
  • Retrieve database table information by using the CTables class.
  • Retrieve database column information by using the CColumns class.
  • Access a rowset of unknown schema by using the CDynamicAccessor class.
  • Access a rowset of unknown schema by using the CManualAccessor class.
  • Use the GetValue and SetValue methods to edit field values in a rowset.
top
Module 7: Executing Parameterized Queries with OLE DB
  • Using Parameters with a Static Accessor
  • Using Parameters with a Dynamic Accessor
  • Using Parameters with a Manual Accessor
  • OLE DB Best Practices
  • Executing Parameterized Queries
  • Executing Dynamic Parameterized Queries
Skills
  • Use parameter map macros to set parameter information and invoke stored procedures.
  • Set parameter information and use the dynamic parameter accessor to retrieve data from a data source, by using a parameterized query.
  • Set parameter information and use the manual accessor to retrieve data from a data source, by using a parameterized query.
  • Describe some best practices when using OLE DB to retrieve data from a data source.
top
Module 8: Introduction to ActiveX Data Objects
  • ADO Object Model Overview
  • Using Data Controls
Skills
  • Describe the role of ADO in applications that require database access.
  • Describe the objects in the ADO object model.
  • Use the ADO Data Control and data-bound controls to retrieve data from a data source.
top
Module 9: Using ActiveX Data Objects
  • Establishing a Database Connection
  • Executing a Command
  • Creating and Navigating Recordsets
  • Finding and Filtering Records in a Recordset
  • Changing a Recordset
  • Using the Fields Collection
  • Retrieving Metadata
  • Lab: Binding Controls and Classes
  • Lab: Entering Data Using ADO
Skills
  • Create an ADO Connection object and open a connection to a data source.
  • Create an ADO Command object and execute a command.
  • Create an ADO Recordset object and navigate a recordset.
  • Add, edit, and delete records in a data source.
  • Use the Fields collection to access field content.
top
Module 10: Parameterized Queries and Error Handling
  • Executing Stored Procedures from a Command
  • Handling Errors
  • Lab: Passing Parameters to a Stored Procedure
  • Lab: Handling Errors in an ADO Application
Skills
  • Call stored procedures and execute SQL parameterized commands by using the Parameters collection.
  • Handle errors by using the Errors collection.
top
> Pre-Requisites
Before attending this course, the student must have the following pre-requisites:
  • Intermediate programming competency with the Visual C++ product, including building and debugging COM components, building applications in MFC by using the Document/View architecture and using structured query language (SQL) syntax.
  • Completed Course 1304, Component Development using the Active Template Library.
  • Completed Course 1011, Mastering MFC Fundamentals Using Microsoft Visual C++.
> Purpose
At the end of the course, students will be able to identify the most appropriate data access technology to be used in developing different types of applications and components; build MFC Client applications that access data from a relational database management system (RDBMS) by using Open Database Connectivity (ODBC); build client applications and components that access data from a data source by using the CAccessor, CDynamicAccessor, and CManualAccessor template classes of OLE DB; build client applications and components that access data from a data source by using ADO.processing pipeline.
> Supplementary Information
This course has now retired and is no longer available. We suggest you look at Course [[{http://www.F1Comp.Co.UK/computer_training/Microsoft_Training_Courses/Visual-Studio-.Net/2124.aspx}2124: Programming with C#.]]