Tải bản đầy đủ (.pdf) (12 trang)

Programming with Microsoft ADO.NET

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (180.06 KB, 12 trang )








Part Number: X08-62669
Course Number: 2389B


Released: 02/2002

Delivery Guide
Programming with
Microsoft
®
ADO.NET


Information in this document, including URL and other Internet Web site references, is subject to
change without notice. Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address,
logo, person, places or events is intended or should be inferred. Complying with all applicable
copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part
of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted
in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or
for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual


property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001-2002 Microsoft Corporation. All rights reserved.

Microsoft, MS-DOS, Windows, Windows NT, Win32, Active Directory, ActiveX, BizTalk,
IntelliSense, JScript, MSDN, SQL Server, Visual Basic, Visual C#, Visual C++, Visual J#, Visual
Studio, and Windows Media are either registered trademarks or trademarks of Microsoft
Corporation in the U.S.A. and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their
respective owners.


Course Number: 2389B
Part Number: X08-62669
Released: 02/2002
Programming with Microsoft® ADO.NET iii


Contents

Introduction
Course Materials ......................................................................................................2

Prerequisites.............................................................................................................3

Course Outline .........................................................................................................4


Microsoft Certified Professional Program ...............................................................6

Facilities...................................................................................................................9

Module 1: Data-Centric Applications and ADO.NET
Overview..................................................................................................................1

Lesson: Design of Data-Centric Applications..........................................................2

Lesson: ADO.NET Architecture..............................................................................9

Lesson: ADO.NET and XML ................................................................................19

Multimedia: ADO.NET and XML.........................................................................22

Demonstration: ADO.NET and XML....................................................................23

Review ...................................................................................................................28

Lab 1.1: Data-Centric Applications and ADO.NET ..............................................30

Module 2: Connecting to Data Sources
Overview..................................................................................................................1

Lesson: Choosing a .NET Data Provider .................................................................2

Lesson: Defining a Connection................................................................................8

Lesson: Managing a Connection............................................................................16


Lesson: Handling Connection Exceptions .............................................................25

Lesson: Connection Pooling ..................................................................................37

Review: Connecting to Data Sources.....................................................................48

Lab 2.1: Connecting to Data Sources.....................................................................50

Module 3: Performing Connected Database Operations
Overview..................................................................................................................1

Lesson: Working in a Connected Environment .......................................................2

Lesson: Building Command Objects .......................................................................4

Lesson: Executing Command Objects That Return a Single Value.......................17

Lesson: Executing Commands That Return Rows.................................................24

Lesson: Executing Commands That Do Not Return Rows....................................35

Lesson: Using Transactions ...................................................................................48

Review ...................................................................................................................57

Lab 3.1: Performing Connected Database Operations...........................................59
iv Programming with Microsoft® ADO.NET


Module 4: Building DataSets

Overview................................................................................................................. 1

Lesson: Working in a Disconnected Environment.................................................. 2

Lesson: Building DataSets and DataTables ............................................................ 5

Lesson: Binding and Saving a DataSet ................................................................. 18

Lab 4.1: Building, Binding, Opening, and Saving DataSets................................. 25

Lesson: Defining Data Relationships.................................................................... 37

Lesson: Modifying Data in a DataTable ............................................................... 43

Lesson: Sorting and Filtering................................................................................ 54

Review .................................................................................................................. 60

Lab 4.2: Manipulating DataSets............................................................................ 62

Module 5: Reading and Writing XML with ADO.NET
Overview................................................................................................................. 1

Lesson: Creating XSD Schemas ............................................................................. 2

Lesson: Loading Schemas and Data into DataSets ............................................... 14

Lesson: Writing XML from a DataSet.................................................................. 25

Review .................................................................................................................. 33


Lab 5.1: Working with XML Data in ADO.NET ................................................. 35

Course Evaluation................................................................................................. 43

Module 6: Building DataSets from Existing Data Sources
Overview................................................................................................................. 1

Lesson: Configuring a DataAdapter to Retrieve Information ................................. 2

Lesson: Populating a DataSet Using a DataAdapter............................................. 14

Lab 6.1: Retrieving Data into a Disconnected Application................................... 29

Lesson: Configuring a DataAdapter to Update the Underlying Data Source ....... 45

Lesson: Persisting Changes to a Data Source ....................................................... 56

Lesson: How to Handle Conflicts ......................................................................... 67

Review .................................................................................................................. 76

Lab 6.2: Retrieving and Updating Customers and Orders Data............................ 78

Module 7: Building and Consuming a Web Service That Uses ADO.NET
Overview................................................................................................................. 1

Lesson: Building and Consuming a Web Service That Returns Data..................... 2

Review .................................................................................................................. 15


Lab 7.1: Troubleshooting an ADO.NET Application ........................................... 16

Course Evaluation................................................................................................. 25

Programming with Microsoft® ADO.NET v


About This Course
This section provides you with a brief description of the course, audience,
suggested prerequisites, and course objectives.
This course teaches developers to build data-centric applications and Web
services with Microsoft
®
ADO.NET, Microsoft SQL Server

2000, and the
Microsoft .NET Framework.
This course is designed for the professional platform developer who is
responsible for designing and building data-centric, distributed applications for
his or her organization. It is designed for developers who have component and
Web-application development skills and who have previously built solutions by
using Microsoft Visual Studio
®
.
Typically, these individuals will have the following skills:
!
Experience with a .NET language such as Microsoft Visual Basic
®
.NET,

Microsoft Visual C#

, or Microsoft Visual C++
®

!
An understanding of object oriented concepts and terminology
!
Experience developing distributed applications
!
Experience developing Web-based applications hosted on Internet
Information Server

Typically, these individuals perform the following key activities:
!
Develop, design, and create interface specifications
!
Create and test prototypes
!
Design site security measures
!
Develop application and data models
!
Write supporting codeDevelop supporting relational databases

Description
Audience

×