Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET...

34

Transcript of Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET...

Page 1: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.
Page 2: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Objective

In this session we will discuss about :

1. What is ADO. NET ?

2. Assembly used in ADO.NET

3. Namespace used in ADO.NET

4. What is the full form of ADO?

5. What are major difference between classic ADO and ADO.NET?

6. ADO.NET Components

7. NET Framework Data Provider

Page 3: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

What is ADO. NET ?

• ADO. NET provides a bridge between the front end controls and the back end

database.

Page 4: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…• ADO.NET is a set of classes that expose data access services for .NET Framework

programmers.

• ADO.NET provides data access services in the Microsoft .NET platform.

• ADO.NET provides consistent access to data sources such as SQL Server and XML,

and to data sources exposed through OLE DB and ODBC.

• Data-sharing consumer applications can use ADO.NET to connect to these data

sources and retrieve, handle, and update the data that they contain.

• ADO.NET includes .NET Framework data providers for connecting to a database,

executing commands, and retrieving results.

Page 5: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Assembly used in ADO.NET

• The ADO.NET classes are found in System.Data.dll, and are integrated with the XML

classes found in System.Xml.dll.

• ADO.NET is a set of computer software components that programmers can use to

access data and data services based on disconnected DataSets and XML.

Page 6: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Namespace used in ADO.NET

Disconnected

Connect

ed

Page 7: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

What is the full form of ADO?• The full form of ADO is ActiveX Data Object.

Page 8: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Features of ADO.NET

1. Contains a number of classes that provide you with various methods and attributes

to manage the communication between your application and data source.

2. Enables you to access different data sources, such as Microsoft SQL Server, and

XML, as per your requirements.

3. 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.

4. 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.

Page 9: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

What are major difference between classic ADO and ADO.NET?

• In ADO we have recordset and in ADO.NET we have dataset.

• In recordset we can only have one table.

• If we want to accommodate more than one tables. We need to do inner join and fill

the recordset.

• Dataset can have multiple tables.

• All data persist in XML as compared to classic ADO where data persisted in Binary

format also.

Page 10: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

ADO.NET Components• The two main components of ADO.NET 3.0 for accessing and manipulating data are

the .NET Framework data providers and the DataSet.

Data providers Data Set

Page 11: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

.NET Framework Data Provider

Page 12: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Data provider• An ADO.NET data provider is a software component that interacts with a data

source.

• It is required for :

1. Connecting to a database.

2. Retrieving data.

3. Storing the data in a dataset.

4. Reading the retrieved data.

5. Updating the database.

Page 13: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

List of Data provider

Page 14: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…

.NET Framework Data Provider for SQL Server (SqlClient)

.NET Framework Data Provider for OLE DB

.NET Framework Data Provider for ODBC

.NET Framework Data Provider for Oracle

Page 15: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Core Objects of .NET Framework Data Providers

Page 16: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Creating and Managing Connections

• To create and manage connections, you need to:

1. Create a connection object.

2. Create a command object.

3. Open the connection object.

4. Execute the SQL statement in the command object.

5. Close the connection object.

Page 17: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

SqlConnection Class

Page 18: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Ex

Page 19: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

SqlCommand

Page 20: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…

Page 21: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Ex

Page 22: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Adding Parameters to Commands

Page 23: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Command Using Stored Procedures

Page 24: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

SqlCommand run a stored procedure that takes a parameter

Page 25: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Data Reader

Page 26: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Ex

Page 27: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Data Adapter

Page 28: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…

Page 29: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…• The DataAdapter object serves as a conduit between the data source and the

Dataset.

• The DataAdapter knows about the DataSet and it knows how to populate it.

Page 30: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…

Page 31: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Ex

Page 32: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.
Page 33: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Continue…

Page 34: Objective In this session we will discuss about : 1.What is ADO. NET ? 2.Assembly used in ADO.NET 3.Namespace used in ADO.NET 4.What is the full form.

Summary!!