1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

ADO.NET: Working in Disconnected Environment Sergey Baidachni MCT, MCSD, MCDBA.
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
Introduction to Database Processing with ADO.NET.
1 ADO.NET. 2.NET Framework Data Namespaces System.Data –Base set of classes and interfaces for ADO.NET System.Data.Common –Classes shared by the.NET Data.
ADO. NET. What is “ADO.Net”? ADO.Net is a new object model for dealing with databases in.Net. Although some of the concepts are similar to the classical.
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
VB.NET Database Access ISYS 812. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Programming in ADO.NET: Data-Centric Applications and ADO.NET Original copyright by Microsoft, 2002, with minor modifications by Dan Eaves, 2005.
Objective In this session we will discuss about : What is ADO. NET ?
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Computer Science 317 Database Management Introduction to Web Access to Databases.
Chapter 9 Using the SqlDataSource Control. References aspx.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
Developing Web Applications Using Microsoft ® Visual Studio ® 2008.
A Simple Introduction. What is ADO.net? First the word ADO stands for ActiveX Data Objects And it is an integral part of.Net Framework of Microsoft hence.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
.NET Data Access and Manipulation ADO.NET. Overview What is ADO.NET? Disconnected vs. connected data access models ADO.NET Architecture ADO.NET Core Objects.
CHAPTER EIGHT Accessing Data Processing Databases.
Chapter 3 Introduction to ADO.NET 3.1 The ADO and ADO.NET ActiveX Data Object (ADO) is developed based on Object Linking and Embedding (OLE) and Component.
Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Prerequisites.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL ADO.Net Basics Ruwan Wijesinghe Trainer.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
ASP.NET Rina Zviel-Girshin Lecture 5
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Module 7: Accessing Data by Using ADO.NET
Christopher M. Pascucci.NET Programming: Databases & ADO.NET.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
An Introduction to ADO.Net Marmagna Desai.NET Seminar, Fall-2003.
 It is the primary data access model for.Net applications  Next version of ADO  Can be divided into two parts ◦ Providers ◦ DataSets  Resides in System.Data.
Mauricio Featherman, Ph.D. Washington St. University
Building Data-Centric Smart Client Applications Rajiv Sodhi Microsoft India.
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
HNDIT Rapid Application Development
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
Module 4 Introduction ADO.NET.
C# .NET Software Development
Active Data Objects Using.Net ADO.Net Farooq Ahmed Amna Umber Summayya Shehzad.
Module 5 Data Classes DataView – DataGridView Control 1.
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
ADO .NET from. ADO .NET from “ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications.
.NET Data Access and Manipulation
ASP.NET Programming with C# and SQL Server First Edition
Data Access with ADO.NET
Introduction to ADO.NET
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
Programming the Web Using ASP.Net
Lecture 6 VB.Net SQL Server.
Active Data Objects Binding ASP.NET Controls to Data
VB.NET Using Database.
Tonga Institute of Higher Education
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Chapter 10 ADO.
PROG Advanced Web Apps 4/13/2019 Programming Data Pages Wendi Jollymore, ACES.
Active Data Objects Binding ASP.NET Controls to Data
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Presentation transcript:

1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006

2 Introduction to ADO.NET “Active Data Objects” A set of class defintions included in the.NET Framework Objects collaborate to provide.NET applications (relatively) easy access to databases. Designed for scalability. 100’s or 1000’s of clients on a database server Offload functionality from server to client

3 The ADO.NET Object Model Adapter Command Reader Connection DataSet DATABASEDATABASE CLIENTCLIENT Data Provider ADO.NET Handles communication with a physical data store. The actual data Knows how to do SQL commands on the database A light weight object for sequential read-only access to a query result. Provides general disconnected access to data

4 Data Provider Collection of Class Definitions Specific to a data source MS SQL Server Oracle (others) Same set of classes for each data source Class name differs SqlDataConnection vs OracleDataConnection SqlCommand vs OracleCommand etc.

5 Data Provider Objects Connection Controls communication with data source Properties: ConnectionString Identifies server and database User ID and password (if external) Methods Open Close

6 Connection String MS SQL Server Examples connStr = "server=scorpius.eng.usf.edu; User ID=turnerr; Password=xxxxxxx" connStr = "server=mssql06.discountasp.net; database=DB_110074; User ID=rollinsturn; Password=xxxxx" connStr = "server=(local)\\VSDOTNET; database=Bulk_Mail_Addresses; Trusted_Connection=yes";

7 Data Provider Objects Command Object Knows how to execute a SQL command on a server Properties: CommandText A SQL statement to be executed at the data source. SqlCommand1.CommandText = "SELECT * FROM Address_List"; Can be changed by the program. Methods ExecuteReader ExecuteScalar ExecuteNonquery

8 Data Provider Objects DataReader A fast, low-overhead object, similar to a StreamReader for file input. Provides forward-only, read-only stream of data from a data source Created by calling the ExecuteReader method of a Command object Never with “new” Connection must remain open while the DataReader is used.

9 Data Provider Objects There are two kinds of “Adapters” Data Adapter Present in ADO 1.0 Continued in ADO 2.1 Table Adapter New in ADO 2.0

10 DataAdapter Provides access to a collection of data from a data source Pemits client to close connection while processing the data. Effectively provides a local cache Client accesses the cache rather than the actual database. Actual database can be updated when desired.

11 Table Adapter Includes a DataAdapter and a Connection object. Improves functionality and ease of use of the original DataAdapter.

12 Data Provider Objects DataAdapter Contains four Command Objects: SelectCommand UpdateCommand InsertCommand DeleteCommand Uses SelectCommand to fill a DataSet Uses other command objects to transmit changes back to the data source

13 The DataSet In-memory copy of data No connection to a database. No knowledge of source or destination of that data that it contains. Simple form of relational database Has a collection of tables Has a collection of DataRelations

14 The DataSet From ADO.NET 2.0 Step by Step

15 The DataSet The DataTable Columns Like the column defintions from a SQL CREATE TABLE statement Name, Data Type, Max Length, Allows Nulls Rows The data Constraints Foreign Key Unique

16 The DataSet Data Relation Programmatic interface for navigating from a master row in one table to related rows in another. Example: Order ID in an Invoice to matching Order IDs in all Line Items for that invoice. Does not enforce referential integrity A foreign key constraint does that.

17 The DataSet A DataSet object can exist independently of any database. We will only use DataSets to hold data retrieved from a database.

18 Summary DataAdapter Command DataReader Connection DataSet DATABASEDATABASE CLIENTCLIENT Data Provider ADO.NET