| Level
1 ADO .NET INTRODUCTION
|
COURSE OUTLINE
- Module 1: Introduction to ADO.NET
- Module 2: Connecting to Data
Sources
- Module 3: Executing Commands
- Module 4: Retrieving Data
- Module 5: Building DataSets
- Module 6: Extending DataSets
- Module 7: Updating Data Sources
- Module 8: XML Techniques
- Module 9: Windows Application
Development
- Module 10: Web Application Development
- Module 11: Web Services Development
|
| INTRODUCTION
TO ADO.NET
|
OVERVIEW
DATA ACCESS ARCHITECTURES
- Connected Environments
- Disconnected Environments
- Potential Data Stores
|
|
ADO.NET NAMESPACES
MOVING FROM ADO TO ADO.NET
SCENARIO
- Connected Scenario ?V Selecting
Data
- Connected Scenario ?V Updating
Data
- Disconnected Scenario ?V Selecting
Data
- Resources
|
| Level 2
|
OVERVIEW
.NET DATA PROVIDERS
CONNECTION CLASS
- Properties
- Methods
- Events
|
| |
CONNECTION STRINGS
- Popular Parameters
- Parameter Synonyms
- SQL Server Security
- Examples
|
| |
MANAGING A CONNECTION
- Open
- Close & Dispose
- Exception Handling
- Implicitly Open and Close
|
| |
CONNECTION POOLING
- What is Connection Pooling
- ConnectionString Settings
- Performance Monitor
- SQL Server Profiler
|
| Level 3
|
OVERVIEW WHAT IS A COMMAND OBJECT?
- Encapsulates a SQL statement or
stored procedure
- Properties
- Methods
|
| |
EXECUTESCALAR
- Returns a single value (object)
- COUNT, MAX, MIN, AVERAGE
|
| |
EXECUTENONQUERY
- DDL, DCL, DML
- Returns # of DML rows affected
|
| |
EXECUTEREADER ?V RETURNS ROWS
EXECUTEXMLREADER
- SQL Server 2000 only
- Returns an XmlReader
|
| |
COMMAND PARAMETERS
- SQL statements and SPs can have
input, output, and return parameters
- Allow these parameters to be
set/read
- Name, Type, Size, Direction
- Build them Programmatically
- Build them via Drag and Drop
- Setting Input Parameters
- Retrieving Output Parameters
- Stored Procedures
- Create with SQL Tools or Visual
Studio
- CommandType
- Use Command Parameters
- TRANSACTIONS
- Set of related tasks that act
as a unit
- Use SQL commands ?V BEGIN TRANS,
COMMIT TRANS, ROLLBACK TRANS
- Or use Try ?V Catch and ADO.NET
|
| Level 4
RETRIEVING DATA
|
OVERVIEW DATAREADER REVISITED
- Read-only, Forward-only stream
- ExecuteReader method returns
- Must "prime" the reader
first
- HasRows, FieldCount, IsClosed
- Item indexer
- GetXXX methods, IsDbNull
- System.Data.SqlTypes
|
| |
DATABINDING
- Cannot bind DataReader to Windows
Forms Controls
- Can bind to Web Form Controls
- Q307860
|
| |
GETSCHEMATABLE
- GetSchemaTable method
- Binding to a Windows DataGrid
|
| |
RETRIEVING OUTPUT PARAMETERS
- Parameter must be Output or ReturnValue
Direction
- DataReader must be closed
|
| |
EXECUTING MULTIPLE STATEMENTS
- Stored Procedure or Batch may
return multiple result sets
- NextResult method
|
| BUILDING DATASETS
|
OVERVIEW DISCONNECTED ENVIRONMENT
DATASET OBJECT MODEL
- DataSet is an in-memory DB
- Tables collection
- Relations collection
|
| |
DATAADAPTER
- Bridge between DataSet and the
Data Source
- Represents a single result set/table
- Contains 4 Command Objects
- DataAdapter Object Model
|
| |
FILLING THE DATASET
- DataAdapter's SelectCommand
- Execute SQL or a SP
|
| |
DATASET SCHEMA
- Infer Schema & Constraints
- FillSchema
|
| |
OPTIMIZING THE FILL
- Typed DataSets
- Set EnforceConstraints = False
- Call BeginLoadData method
|
Level 5
|
OVERVIEW BUILDING DATASETS
- Creating the pieces
- Column Properties
- Custom Expressions
|
| |
ADDING CONSTRAINTS
- Primary Key
- Foreign Key Constraints
|
| |
ADDING DATARELATIONS
SELECTING DATA
DATAVIEWS
STRONGLY TYPED DATASETS
|
| Level 6
|
OVERVIEW BUILDING DATASETS
- Create the DataSet, DataTable,
and DataColumn
- Column Properties
- Custom Expressions
|
| |
ADDING CONSTRAINTS
- Unique constraints at the column
or table level
- Specifying a Primary Key
- Foreign Key Constraints
- Enforce Referential Integrity
- UpdateRule and DeleteRule
|
| |
ADDING DATARELATIONS
- Support navigation, not Referential
Integrity (RI)
- DataGrid or custom "drilldown"
|
| |
SELECTING DATA
- DataTables have a Select method
- Specify optional Sort and RowState
filter
|
| |
DATAVIEWS
- Support navigation, not Referential
Integrity (RI)
- DataGrid or custom "drilldown"
|
| |
STRONGLY TYPED DATASETS |
| Level 7
|
OVERVIEW WRITING AND READING XML
DATA
- Writing XML Data
- GetXml and WriteXm
- DataRelation Nested Property
- Reading XML Data
|
| |
READING AND WRITING XML SCHEMA
- Writing XML Schema
- Reading XML Schema
|
| |
MAPPING RELATIONAL TO SCHEMA
- Tables map to ComplexTypes
- Nested Tables map to nested ComplexTypes
- UniqueConstraints map to Key/Unique
constraints
- ForeignKeyConstraints map to
KeyRef Elements
|
| |
XMLDATADOCUMENT
- System.Xml namespace
- Cast to/from DataSet
|
| |
SERIALIZATION
- DataSet can be serialized
- Web Services
|
| Level 8
|
OVERVIEW LEVERAGING DRAG AND DROP
|
| |
CONNECTION EVENTS
- StateChange Event
- InfoMessage Event
|
| |
DATA BINDING
|
| |
DATAGRID CONTROL
- Hierarchical, Sortable
- Lived updates to DataSet
- Properties
- Auto-Format
|
| |
RESOURCES |
| Level 9
|
OVERVIEW STATE MANAGEMENT
- Web Applications are Stateless
- Where to store the State
|
| |
INTEGRATED SECURITY
- User is no longer the client
- Use SQL Profiler to monitor
- Use Enterprise Manager to manage
|
| |
DATABINDING
- Web Server Controls
- DataReader as a DataSource
- Properties
- DataBind Method
|
| |
DATAGRID
- DataSource, DataMember
- Binding Columns
|
| |
DATAVIEW REVISITED
- Show relevant information
- Output Cache
- OutputCache directive
|
| |
Caching Application Data |
| Level 10
USING ADO.NET IN XML WEB
SERVICES DEVELOPMENT
|
OVERVIEW XML WEB SERVICES ARCHITECTURE
- Discrete Application Logic
- Internal or external
- Platform neutral
- Interoperability
- W3C protocols
|
| |
CONSTRUCTING AN XML WEB SERVICE
- ASP.NET Architecture
- Class and Methods with Attributes
- No Interface
|
| |
CHOICES FOR RETURNING DATA
- Data type must be XML serializable
String
- XmlDocument
- DataSet
|
| |
CONSUMING AN XML WEB SERVICE
- Various client application types
- Web Reference
- Proxy Class
- DataSet
|
| SUMMARY
PROGRAMMING WITH ADO.NET
REVIEW
|
REVIEW
- Introduction to ADO.NET
- Connecting to Data Sources
- Executing Commands
- Retrieving Data
- Building DataSets
- Extending DataSets
- Updating Data Sources
- XML Techniques
- Using ADO.NET in Windows Application
Development
- Using ADO.NET in Web Application
Development
- Using ADO.NET in Web Services
Development
|