SlideShare a Scribd company logo
7
Most read
9
Most read
11
Most read
Presentation
Created By :
Prabhu R
.Net
ADO.Net
Introduction to Ado.net
 Ado stand for Active Database Object.
 Before Ado.net we use Ado to access data from
database. Basically Ado has automatic driver
detection technique and its has only one drawback
that it only provide a connected environment so
efficiency of system may decrease.
 ADO.NET is a new database technology used by
.NET platform (introduced in 2002).
 In fact it is a set of classes used to communicate
between an application front end and a database.
 It supports both connected & disconnection mode of
data access.
Difference between ADO and ADO.NET
ADO ADO.NET
1.It is a COM based library. 1.It is a CLR based library.
2.Classic ADO requires active connection with the
data store.
2.ADO.NET architecture works while the data store is
disconnected.
3.Locking feature is available. 3.Locking feature is not available.
4.Data is stored in binary format. 4.Data is stored in XML.
5.XML integration is not possible. 5.XML integration is possible.
6.It uses the object named Recordset to reference
data from the data store.
6.It uses Dataset Object for data access and
representation.
7.Using Classic ADO, we can obtain information from
one table or set of tables through join. We cannot
fetch records from multiple tables independently.
7.Dataset object of ADO.NET includes collection of
DataTables wherein each DataTable will contain records
fetched from a particular table. Hence multiple table
records are maintained independently.
8.Firewall might prevent execution of Classic ADO.
8.ADO.NET has firewall proof and its execution will never
be interrupted.
9.Classic ADO architecture includes client side cursor
and server side cursor. 9.ADO.NET architecture doesn't include such cursors.
10.We cannot send multiple transactions using a
single connection instance.
10.We can send multiple transactions using a single
connection instance.
Namespaces used in ADO. Net
 System.Data
 It contains the common classes for connecting, fetching data
from database. Classes are like as DataTable, DataSet,
DataView etc.
 System.Data.SqlClient
 It contains classes for connecting, fetching data from Sql
Server database. Classes are like as
SqlDataAdapter,SqlDataReader etc.
 System.Data.OracleClient
 It contains classes for connecting, fetching data from Oracle
database. Classes are like as
OracleDataAdapter,OracleDataReader etc.
 System.Data.OleDb
 It contains classes for connecting, fetching data from any
database(like msaccess, db2, oracle, sqlserver, mysql).
Classes are like as OleDbDataAdapter,OleDbDataReader
etc.
 System.Data.Odbc
 It contains classes for connecting, fetching data from any
ADO.NET Architecture
Component of ADO.NET
architecture
 The two key components of ADO.NET are
 Data Providers
 DataSet
DataSet
 Basically it is a small Data structure that may
contain multiple datatables from multiple sources.
 The information in dataset is created inform of
XML and is stored with .xsd extention.
 It support disconnected mode of data access.It
has both scrolling mode means forward and
backward scrolling mode (fetching of data).
 DataSet can have multiple Datatable from
multiple sources but DataReader is able toread
only single Datatable.
Creating and using a DataSet
 The typical steps in creating and using a DataSet
are:
 (i)Create a DataSet object
 (ii) Connect to a database
 (iii)Fill the DataSet with one or more tables or views
 (iv)Disconnect from the database
 (v)Use the DataSet in the application
Data Provider
 Data provider is a set of ADO.Net classes that allow us to
access a database. Basically, it is a bridge between our
application (We can say front-end) and data source. There
are following Data Provider :
 SqlServer Data Provider:-It is used to access data from SqlServer
database (for version 7.0 or later).
 Oracle Data Provider:-It is used to access data from oracle
database (for version 8i or later).
 OleDb Data Provider:-It is used to access data from any database
(msaccess, mysql, db2).
 Odbc Data Provider :-It is used to access data from any database
(msaccess, mysql, db2).
 The four Objects from the .Net Framework provides
the functionality of Data Providers in the ADO.NET.
They are
 Connection Object
 Command Object
 Data Reader Object
 Data Adapter Object.
The SQLCONNECTION OBJECT
 The Connection :-The Connection object which
provides a connection to the database
Command Object
 The Command :-The Command object which is
used to execute a command
 It provide three methods which are used to
execute commands on the database:
 ExecuteNonQuery: Executes commands that
have no return values such as INSERT, UPDATE
or DELETE
 ExecuteScalar : Returns a single value from a
database query
 ExecuteReader: Returns a result set by way of a
DataReader object
Data Adapter Object.
 data adapter : The DataAdapter serve as a bridge
between a DataSet and data source for retrieving and
saving data.
 The DataAdapter provides this bridge by using Fill to load
data from the data source into the DataSet and using
Update to send changes made in the DataSet back to the
data source.
 The data adapter objects connect a command objects to a
Dataset object.
 They provide the means for the exchange of data
between the data store and the tables in the DataSet.
 An OleDbDataAdapter object is used with an OLE-DB
provider A SqlDataAdapter object uses Tabular Data
Services with MS SQL Server.
Data Reader Object
 The DataReader:- The DataReader object which
provides a forward-only, read only, connected
recordset
 Limitations of the DataReader
 There is not possible to sort, filter, or manipulate the
data while using a DataReader, since it is read-only
and forward-only.
Differences between DataSet and
DataReader
DataSet DataReader
DataSet object can contain multiple
rowsets from the same data source as
well as from the relationships between
them.
DataReader provides forward-only and
read-only access to data.
Dataset is a disconnected architecture. Datareader is connected architecture.
Dataset can persist data. Datareader can not persist data.
A DataSet is well suited for data that
needs to be retrieved from multiple
tables.
It has live connection while reading
data
DatsSet is slower than DataReader
,Due to overhead.
Speed performance is better in
DataReader

More Related Content

PPSX
ADO.NET
PPT
ADO .Net
PPT
ADO.NET
PPTX
INTEGRATIVE PROGRAMMING ch1.pptx
PPTX
Lecture 1 introduction to vb.net
PPTX
PDF
Event Driven programming(ch1 and ch2).pdf
PPTX
Operating system - Process and its concepts
ADO.NET
ADO .Net
ADO.NET
INTEGRATIVE PROGRAMMING ch1.pptx
Lecture 1 introduction to vb.net
Event Driven programming(ch1 and ch2).pdf
Operating system - Process and its concepts

What's hot (20)

PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
PDF
Arrays in Java
PPTX
Applets in java
PPTX
Java package
PPTX
Graph coloring using backtracking
PPTX
Event handling
PPT
SQLITE Android
PPTX
STRUCTURE OF SQL QUERIES
PDF
Java threads
PPTX
JAVA AWT
PPT
3 Tier Architecture
PPTX
Sql subquery
PPT
Servlet life cycle
PPTX
Java Beans
PPTX
Data types in java
PPTX
MULTI THREADING IN JAVA
PPTX
Relational Data Model Introduction
PPTX
Database architecture
Basic Concepts of OOPs (Object Oriented Programming in Java)
Arrays in Java
Applets in java
Java package
Graph coloring using backtracking
Event handling
SQLITE Android
STRUCTURE OF SQL QUERIES
Java threads
JAVA AWT
3 Tier Architecture
Sql subquery
Servlet life cycle
Java Beans
Data types in java
MULTI THREADING IN JAVA
Relational Data Model Introduction
Database architecture
Ad

Viewers also liked (12)

PPTX
ADO.NET -database connection
PDF
Chapter 1
PDF
Difference between vbscript and javascript
PDF
ADO.NET difference faqs compiled- 1
PDF
Dotnet difference questions and answers compiled- 1(updated-2)
PPTX
Client and server side scripting
PPT
Ado.net
PPT
ASP.NET 09 - ADO.NET
PPT
For Beginers - ADO.Net
PPT
Introduction to ADO.NET
PPT
ASP.NET Tutorial - Presentation 1
PPT
Asp.net.
ADO.NET -database connection
Chapter 1
Difference between vbscript and javascript
ADO.NET difference faqs compiled- 1
Dotnet difference questions and answers compiled- 1(updated-2)
Client and server side scripting
Ado.net
ASP.NET 09 - ADO.NET
For Beginers - ADO.Net
Introduction to ADO.NET
ASP.NET Tutorial - Presentation 1
Asp.net.
Ad

Similar to Ado.Net Tutorial (20)

DOC
PPT
Introduction to ado
PPTX
PPT temp.pptx
PPT
Session x(ado.net)
PPT
Introduction to ado.net
PPTX
111111112222223333335555555666Unit-4.pptx
PPT
Chapter 4 event it theory programming.pptx
PPTX
Ch06 ado.net fundamentals
PPT
Chap14 ado.net
PPTX
Ado.net
PPT
Database programming in vb net
PDF
PPTX
Ado.net
PPT
ado.net
PDF
ADO.NET Interview Questions PDF By ScholarHat
PDF
What is ado .net architecture_.pdf
PPT
PPTX
Is2215 lecture7 lecturer_ado_intro
PPTX
ADO .NET by Sonu Vishwakarma
PPT
Introduction to ado
PPT temp.pptx
Session x(ado.net)
Introduction to ado.net
111111112222223333335555555666Unit-4.pptx
Chapter 4 event it theory programming.pptx
Ch06 ado.net fundamentals
Chap14 ado.net
Ado.net
Database programming in vb net
Ado.net
ado.net
ADO.NET Interview Questions PDF By ScholarHat
What is ado .net architecture_.pdf
Is2215 lecture7 lecturer_ado_intro
ADO .NET by Sonu Vishwakarma

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ISO 45001 Occupational Health and Safety Management System
PPT
Introduction Database Management System for Course Database
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
top salesforce developer skills in 2025.pdf
CHAPTER 2 - PM Management and IT Context
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Migrate SBCGlobal Email to Yahoo Easily
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Wondershare Filmora 15 Crack With Activation Key [2025
VVF-Customer-Presentation2025-Ver1.9.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms I-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 41
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
ManageIQ - Sprint 268 Review - Slide Deck
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ISO 45001 Occupational Health and Safety Management System
Introduction Database Management System for Course Database
Online Work Permit System for Fast Permit Processing
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
2025 Textile ERP Trends: SAP, Odoo & Oracle
top salesforce developer skills in 2025.pdf

Ado.Net Tutorial

  • 2. Introduction to Ado.net  Ado stand for Active Database Object.  Before Ado.net we use Ado to access data from database. Basically Ado has automatic driver detection technique and its has only one drawback that it only provide a connected environment so efficiency of system may decrease.  ADO.NET is a new database technology used by .NET platform (introduced in 2002).  In fact it is a set of classes used to communicate between an application front end and a database.  It supports both connected & disconnection mode of data access.
  • 3. Difference between ADO and ADO.NET ADO ADO.NET 1.It is a COM based library. 1.It is a CLR based library. 2.Classic ADO requires active connection with the data store. 2.ADO.NET architecture works while the data store is disconnected. 3.Locking feature is available. 3.Locking feature is not available. 4.Data is stored in binary format. 4.Data is stored in XML. 5.XML integration is not possible. 5.XML integration is possible. 6.It uses the object named Recordset to reference data from the data store. 6.It uses Dataset Object for data access and representation. 7.Using Classic ADO, we can obtain information from one table or set of tables through join. We cannot fetch records from multiple tables independently. 7.Dataset object of ADO.NET includes collection of DataTables wherein each DataTable will contain records fetched from a particular table. Hence multiple table records are maintained independently. 8.Firewall might prevent execution of Classic ADO. 8.ADO.NET has firewall proof and its execution will never be interrupted. 9.Classic ADO architecture includes client side cursor and server side cursor. 9.ADO.NET architecture doesn't include such cursors. 10.We cannot send multiple transactions using a single connection instance. 10.We can send multiple transactions using a single connection instance.
  • 4. Namespaces used in ADO. Net  System.Data  It contains the common classes for connecting, fetching data from database. Classes are like as DataTable, DataSet, DataView etc.  System.Data.SqlClient  It contains classes for connecting, fetching data from Sql Server database. Classes are like as SqlDataAdapter,SqlDataReader etc.  System.Data.OracleClient  It contains classes for connecting, fetching data from Oracle database. Classes are like as OracleDataAdapter,OracleDataReader etc.  System.Data.OleDb  It contains classes for connecting, fetching data from any database(like msaccess, db2, oracle, sqlserver, mysql). Classes are like as OleDbDataAdapter,OleDbDataReader etc.  System.Data.Odbc  It contains classes for connecting, fetching data from any
  • 6. Component of ADO.NET architecture  The two key components of ADO.NET are  Data Providers  DataSet
  • 7. DataSet  Basically it is a small Data structure that may contain multiple datatables from multiple sources.  The information in dataset is created inform of XML and is stored with .xsd extention.  It support disconnected mode of data access.It has both scrolling mode means forward and backward scrolling mode (fetching of data).  DataSet can have multiple Datatable from multiple sources but DataReader is able toread only single Datatable.
  • 8. Creating and using a DataSet  The typical steps in creating and using a DataSet are:  (i)Create a DataSet object  (ii) Connect to a database  (iii)Fill the DataSet with one or more tables or views  (iv)Disconnect from the database  (v)Use the DataSet in the application
  • 9. Data Provider  Data provider is a set of ADO.Net classes that allow us to access a database. Basically, it is a bridge between our application (We can say front-end) and data source. There are following Data Provider :  SqlServer Data Provider:-It is used to access data from SqlServer database (for version 7.0 or later).  Oracle Data Provider:-It is used to access data from oracle database (for version 8i or later).  OleDb Data Provider:-It is used to access data from any database (msaccess, mysql, db2).  Odbc Data Provider :-It is used to access data from any database (msaccess, mysql, db2).
  • 10.  The four Objects from the .Net Framework provides the functionality of Data Providers in the ADO.NET. They are  Connection Object  Command Object  Data Reader Object  Data Adapter Object.
  • 11. The SQLCONNECTION OBJECT  The Connection :-The Connection object which provides a connection to the database
  • 12. Command Object  The Command :-The Command object which is used to execute a command  It provide three methods which are used to execute commands on the database:  ExecuteNonQuery: Executes commands that have no return values such as INSERT, UPDATE or DELETE  ExecuteScalar : Returns a single value from a database query  ExecuteReader: Returns a result set by way of a DataReader object
  • 13. Data Adapter Object.  data adapter : The DataAdapter serve as a bridge between a DataSet and data source for retrieving and saving data.  The DataAdapter provides this bridge by using Fill to load data from the data source into the DataSet and using Update to send changes made in the DataSet back to the data source.  The data adapter objects connect a command objects to a Dataset object.  They provide the means for the exchange of data between the data store and the tables in the DataSet.  An OleDbDataAdapter object is used with an OLE-DB provider A SqlDataAdapter object uses Tabular Data Services with MS SQL Server.
  • 14. Data Reader Object  The DataReader:- The DataReader object which provides a forward-only, read only, connected recordset  Limitations of the DataReader  There is not possible to sort, filter, or manipulate the data while using a DataReader, since it is read-only and forward-only.
  • 15. Differences between DataSet and DataReader DataSet DataReader DataSet object can contain multiple rowsets from the same data source as well as from the relationships between them. DataReader provides forward-only and read-only access to data. Dataset is a disconnected architecture. Datareader is connected architecture. Dataset can persist data. Datareader can not persist data. A DataSet is well suited for data that needs to be retrieved from multiple tables. It has live connection while reading data DatsSet is slower than DataReader ,Due to overhead. Speed performance is better in DataReader