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.

Slides:



Advertisements
Similar presentations
Programming with ADO.NET By Sam Nasr April 27, 2004 Programming with ADO.NET By Sam Nasr April 27, 2004.
Advertisements

ADO vs ADO.NET ADOADO.NET Client/server coupledDisconnected collection of data from data server Uses RECORDSET object (contains one table) Uses DATASET.
By Chris Pascucci and FLF
Introduction to Database Processing with ADO.NET.
Object-Oriented Application Development Using VB.NET 1 Chapter 13 Introduction to Data Access Classes and Persistence.
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.
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
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.
Objective In this session we will discuss about : What is ADO. NET ?
In C# program Before you can start using the ODBC class definitions, you will need to include the right module. using System.Data.Odbc; // ODBC definitions.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
ADO.NET – part II August 2004 [ Marmagna Desai]. CONTENTS ADO vs ADO.NET ADO.NET – Managed providers Connecting to Database SqlConnection Selecting Database.
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.
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)
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.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
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.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with Disconnected Data The DataSet and SqlDataAdapter ADO.NET - Lesson.
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
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
HNDIT Rapid Application Development
Module 4 Introduction ADO.NET.
C# .NET Software Development
Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers.
Active Data Objects Using.Net ADO.Net Farooq Ahmed Amna Umber Summayya Shehzad.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlCommand Object ADO.NET - Lesson 03  Training time: 15 minutes  Author:
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
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Reading Data with the SqlDataReader ADO.NET - Lesson 04  Training time: 10.
 ADO.NET is an object-oriented set of libraries that allows you to interact with data sources  Commonly, the data source is a database, but it could.
Integrating Data Lesson 6.
ASP.NET Programming with C# and SQL Server First Edition
Data Access with ADO.NET
Introduction to ADO.NET
Accessing Databases using 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
ADO.NET Accessing Databases in VS.NET
Tonga Institute of Higher Education
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Database Objects 1/12/2019 See scm-intranet.
Опит в използването на ODP.NET с Oracle 9i
Chapter 10 ADO.
.NET Framework Data Providers
Active Data Objects Binding ASP.NET Controls to Data
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Introduction to Database Programming through ADO. NET
Presentation transcript:

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

What is ADO? ADO.NET is an object-oriented set of libraries that allows you to interact with data sources. Commonly, the data source is a database, but it could also be a text file, an Excel spreadsheet, or an XML file.

Data Providers 4 ADO.NET allows us to interact with different types of data sources and different types of databases. There isn't a single set of classes that allow you to accomplish this universally. Different data sources expose different protocols. Some older data sources use the ODBC protocol, many newer data sources use the OleDb protocol

Data Providers 5 Provider Name API prefix Data Source Description ODBC Data Provider OdbcData Sources with an ODBC interface. Normally older data bases. OleDb Data Provider OleDbData Sources that expose an OleDb interface, i.e. Access or Excel. Oracle Data Provider OracleFor Oracle Databases. SQL Data Provider SqlFor interacting with Microsoft SQL Server.

ADO.NET Objects Connection Object Command Object DataReader DataSet DataAdapter

Connection Object To interact with a database, you must have a connection to it. The connection helps identify the database server, the database name, user name, password, and other parameters that are required for connecting to the data base. A connection object is used by command objects so they will know which database to execute the command on. 7

Command Object You use a command object to send SQL statements to the database. A command object uses a connection object to figure out which database to communicate with. You can use a command object alone, to execute a command directly, or assign a reference to a command object to a DataAdapter, which holds a set of commands that work on a group of data as described below.

DataReader Many data operations require that you only get a stream of data for reading. The data reader object allows you to obtain the results of a SELECT statement from a command object. For performance reasons, the data returned from a data reader is a fast forward-only stream of data. This means that you can only pull the data from the stream in a sequential manner This is good for speed, but if you need to manipulate data, then a DataSet is a better object to work with.

DataSets DataSet objects are in-memory representations of data. They contain multiple Datatable objects, which contain columns and rows. You can even define relations between tables to create parent-child relationships.

DataAdapter The data adapter helps to manage data in a disconnected mode. The data adapter fills a DataSet object when reading the data and writes in a single batch when persisting changes back to the database. A data adapter contains a reference to the connection object and opens and closes the connection automatically when reading from or writing to the database. Additionally, the data adapter contains command object references for SELECT, INSERT, UPDATE, and DELETE operations on the data.

Using a Connection The purpose of creating a Connection object is so you can enable other ADO.NET code to work with a database. Other ADO.NET objects, such as a Command and a DataAdapter take a connection object as a parameter. Instantiate the Connection. Open the connection. Pass the connection to other ADO.NET objects. Perform database operations with the other ADO.NET objects. Close the connection.

Using Command Objects A SqlCommand object allows you to query and send commands to a database. It has methods that are specialized for different commands. The ExecuteReader method returns a DataReader object for viewing the results of a select query. For insert, update, and delete SQL commands, you use the ExecuteNonQuery method. If you only need a single aggregate value from a query, the ExecuteScalar is the best choice

DataReader Objects A DataReader is a type that is good for reading data in the most efficient manner possible. You can *not* use it for writing data. You can read from DataReader objects in a forward-only sequential manner. Once you've read some data, you must save it because you will not be able to go back and read it again.

DataSets and DataAdapters A DataSet is an in-memory data store that can hold numerous tables. DataSets only hold data and do not interact with a data source. It is the DataAdapter that manages connections with the data source and gives us disconnected behavior. The DataAdapter opens a connection only when required and closes it as soon as it has performed its task.

DataAdapters A DataAdapter performs the following tasks when filling a DataSet with data: Open connection Retrieve data into DataSet Close connection 16