0% found this document useful (0 votes)
13 views

Database Integrations Lesson

ADO.NET is an object-oriented framework for interacting with database systems. It allows for disconnected data access and combining data from multiple sources. The core ADO.NET objects include Connection, Command, DataReader, DataAdapter, DataTable, and DataSet, which enable establishing connections to databases and executing commands to access and manipulate data. ADO.NET uses connection strings to specify the database server, database name, and credentials needed to connect an application to a database.

Uploaded by

ahmed jeylaani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Database Integrations Lesson

ADO.NET is an object-oriented framework for interacting with database systems. It allows for disconnected data access and combining data from multiple sources. The core ADO.NET objects include Connection, Command, DataReader, DataAdapter, DataTable, and DataSet, which enable establishing connections to databases and executing commands to access and manipulate data. ADO.NET uses connection strings to specify the database server, database name, and credentials needed to connect an application to a database.

Uploaded by

ahmed jeylaani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

ADO.

NET

.NET Data Access and Manipulation


Overview
 What is ADO.NET?
 Disconnected vs. connected data access models
 ADO.NET Architecture
 ADO.NET Core Objects
 Steps of Data Access
 Advanced Techniques and UI Tools
What is ADO.NET?
 A data-access technology that enables applications to
connect to data stores and manipulate data contained
in them in various ways
 Former version was ADO (ActiveX Data Object)
What is ADO.NET?
 An object oriented framework that allows you to
interact with database systems
Objective of ADO.NET
 Support disconnected data
architecture,
 Ability to combine data from multiple
and varied data sources
 Optimized facilities for interacting
with a database
 ADO.NET features
 Contains a number of classes that provide you with various methods
and attributes to manage the communication between your
application and data source.
 Enables you to access different data sources, such as Microsoft SQL
Server, and XML, as per your requirements.
 Provides a rich set of features, such as connection and commands that
can be used to develop robust and highly efficient data services in
.NET applications.
 Provides various data providers that are specific to databases produced
by various vendors. For example, ADO.NET has a separate provider
to access data from Oracle databases; whereas, another provider is
used to access data from SQL databases.
ADO.NET Architecture
ADO.NET Core Objects
 Core namespace: System.Data
 .NET Framework data providers:

Data Provider Namespace

SQL Server System.Data.SqlClient

OLE DB System.Data.OleDb

ODBC System.Data.Odbc

Oracle System.Data.OracleClient
ADO.NET Core Objects
Object Description

Connection Establishes a connection to a specific data source. (Base


class: DbConnection)
Command Executes a command against a data source. Exposes
Parameters and can execute within the scope of a
Transaction from a Connection. (The base class:
DbCommand)
DataReader Reads a forward-only, read-only stream of data from a data
source. (Base class: DbDataReader)
DataAdapter Populates a DataSet and resolves updates with the data
source. (Base class: DbDataAdapter)
DataTable Has a collection of DataRows and DataColumns
representing table data, used in disconnected model
DataSet Represents a cache of data. Consists of a set of DataTables
and relations among them
Connection String
To connect the application to a database, the Connection object must
know:

• The name of the server on which the database resides.

• The name of the database itself.

• The credentials that will allow it to establish a connection to the


database.

These credentials are either a username and password or a Windows


account that has been granted rights to the database.
Public string conString =
“Server=.;Database=UOBDB1;Integrated Security =
True")

You might also like