Download presentation
Presentation is loading. Please wait.
Published byKristina Flowers Modified over 9 years ago
1
Module 9: Accessing Relational Data Using Microsoft Visual Studio.NET
2
Overview Overview of ADO.NET Creating a Connection to a Database Displaying a DataSet in a List-Bound Control
3
Lesson: Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET Practice: Identifying ADO.NET Components
4
ADO.NET provides a set of classes for working with data. ADO.NET provides: An evolutionary, more flexible successor to ADO A system designed for disconnected environments A programming model with advanced XML support A set of classes, interfaces, structures, and enumerations that manage data access from within the.NET Framework What is ADO.NET?
5
Using Namespaces Namespaces used with ADO.NET include: System.Data.SqlClient System.Data.OleDb System.Data.Odbc System.Data.OracleClient
6
DataSet SQL Server.NET Data Provider OLE DB.NET Data Provider SQL Server 7.0 (and later) OLEDB sources (SQL Server 6.5) OleDbConnection OleDbDataAdapter SqlDataAdapter SqlConnection DataTable The ADO.NET Object Model
7
SQL Server 2000 DataSet DataTable Physical storage OleDb Database SqlDataAdapter SqlConnection DataTable Web server memory OleDbDataAdapter OleDbConnection What is a Dataset?
8
Accessing Data with ADO.NET Database 4.Return the DataSet to the Client 5.Client manipulates the data 2.Create the SqlConnection and SqlDataAdapter objects 3.Fill the DataSet from the DataAdapter and close the connection SqlDataAdapter SqlConnection List-Bound Control 1.Client makes request11 22 33 44 55 6.Update the DataSet 7.Use the SqlDataAdapter to open the SqlConnection, update the database, and close the connection 66 77 Client Web server DataSet
9
Lesson: Creating a Connection to a Database Using Server Explorer to Generate a Connection The DataAdapter Object Model Demonstration: Connecting to a Database Generating a DataSet Demonstration: Generating a DataSet
10
Using Server Explorer to Generate a Connection Create a new data connection by dragging a Table from Server Explorer Create a new data connection using the Data Links dialog box
11
The DataAdapter Object Model sp_SELECT Command SelectCommandUpdateCommandInsertCommandDeleteCommand DataAdapter Command Connection sp_UPDATEsp_INSERTsp_DELETE Database DataSet DataReader
12
Review Overview of ADO.NET Creating a Connection to a Database
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.