SlideShare une entreprise Scribd logo
1  sur  21
ACCESSING
RELATIONAL DATA
USING MICROSOFT
VISUAL STUDIO .NET
OVERVIEW
 What is .NET?
 .NET History.
 Introduction to ADO .NET
 History of ADO .NET
 Using Namespaces
 The ADO.net object model
 What is DataSet
 Accessing the Data with ADO .NET
 Data Adapter Object Model
 Creating a DataAdapter
 Generating a DataSet
 Storing Multiple Tables
 What are List-Bound Controls?
.NET
 It erases the boundaries between applications and the Internet. Instead
of interacting with an application or a single Web site, .NET will connect
the user to an array of computers and services that will exchange and
combine objects and data.
 A Microsoft operating system platform that incorporates
applications, a suite of tools and services the company's Web
strategy. There are four main principles of .NET from the
perspective of the user:
 Software will be rented as a hosted service over the Internet instead of
purchased on a store shelf. Essentially, the Internet will be housing all
your applications and data.
 Users will have access to their information on the Internet from any
device, anytime, anywhere.
HISTORY
.NET Framework
Developer(s) Microsoft
Initial release 13 February 2002; 12 years ago
Latest release 4.5.1 (4.5.50938.18408) /
17 October 2013; 5 months ago
Operating system Windows 98 or later,Windows NT
4.0 or later
Type Software framework
License Proprietary; BCL underMicrosoft
Reference Source License
[1]
Website www.microsoft.com/net
INTRODUCTION
 ADO Stand form ActiveX Data Object (Network Enable
Technology).
 It is use for the database connection during the web developing
or software developing.
 ADO.NET is a set of classes that expose data access services
for .NET Framework programmers.
 ADO.NET provides a rich set of components for creating
distributed, data-sharing applications.
 ADO.NET supports a variety of development needs, including
the creation of front-end database clients and middle-tier
business objects used by applications, tools, languages, or
Internet browsers.
CONT…
ADO.NET provides a set of classes for working with
data. ADO.NET provides:
 An evolutionary, more flexible successor to ADO
 A system designed for disconnected environments
 A programming model with advanced XML support
 A set of classes, interfaces, structures, and
enumerations that manage data access from
within
the .NET Framework
Entity Framework
Developer(s) Microsoft
Initial release August 11, 2008; 5 years ago
Latest release 6.0.2 / December 13, 2013; 3
months ago
Written in C#
Platform .NET Framework
Type Object-relational mapping
License Apache License
Website msdn.microsoft.com/en-
us/data/ef.aspx
WHAT'S NEW IN ADO.NET?
1.SqlClient Data provider:-
 Streaming support from SQL Server to an application supports scenarios
where data on the server is unstructured.
 Support has been added for asynchronous programming.
 Connection failures will now be logged in the extended events log.
2.ADO.NET Entity Framework :-
The .NET Framework 4.5 adds APIs that enable new scenarios when working
with the Entity Framework 5.0.
USING NAMESPACES
 Use the Imports or using statement to
import namespaces
 Namespaces used with ADO.NET
include:
 System.Data
 System.Data.SqlClient
 System.Data.OleDb
Imports System.Data
Imports System.Data.SqlClient
using System.Data;
using System.Data.SqlClient;
DataSet
SQL Server .NET
Data Provider
OLE DB .NET
Data Provider
SQL Server 7.0
(and later)
OLEDB sources
(SQL Server 6.5)
OleDbConnection
OleDbDataAdapter
SqlDataAdapter
SqlConnection
DataTable
DataTable
THE ADO.NET OBJECT MODEL
SQL Server 2000
DataSet
DataTable
DataTable
Physical storage
OleDb Database
SqlDataAdapter
SqlConnection
DataTable
Client/Web server memory
OleDbDataAdapter
OleDbConnection
WHAT IS A DATASET?
ACCESSING DATA WITH ADO.NET
Database
4. Return the DataSet to the Client
5. Client manipulates the data
2. Create the SqlConnection and SqlDataAdapter objects
3. Fill the DataSet from the DataAdapter
and close the connection
SqlDataAdapter
SqlConnection
List-Bound
Control
1. Client makes request1
2
3
4
5
6. Update the DataSet
7. Use the SqlDataAdapter to open
the SqlConnection, update the
database, and close the
connection
6
7
Client
Web server
DataSet
THE DATAADAPTER OBJECT MODEL
sp_SELECT
Command
SelectCommand UpdateCommand InsertCommand DeleteCommand
DataAdapter
Command Command Command
Connection
sp_UPDATE sp_INSERT sp_DELETE
Database
DataSet
DataReader
 Store the query in a DataAdapter
 The DataAdapter constructor sets the SelectCommand
property
 Set the InsertCommand, UpdateCommand, and
DeleteCommand properties if needed
CREATING A DATA ADAPTER
Dim da As New SqlDataAdapter _
("select * from Authors", conn)
da.SelectCommand.CommandText
da.SelectCommand.Connection
SqlDataAdapter da = new SqlDataAdapter
("select * from Authors",conn);
da.SelectCommand.CommandText;
da.SelectCommand.Connection;
GENERATING A DATASET
 You can generate a DataSet…
 …through the UI…
 Creates a DataSet that allows you to access
data as an object
 …or through code…
 and then fill…
Dim ds As New DataSet()
DataAdapter1.Fill(ds)
DataAdapter2.Fill(ds)
DataSet ds = new DataSet();
DataAdapter1.Fill(ds);
DataAdapter2.Fill(ds);
STORING MULTIPLE TABLES
 Add the first table
 Add the subsequent table(s)
daCustomers = New SqlDataAdapter _
("select * from Customers", conn1)
daCustomers.Fill(ds, "Customers")
Orders
Customers
daOrders = New SqlDataAdapter _
("select * from Orders", conn2)
daOrders.Fill(ds, "Orders")
conn2conn1
DataSet
WHAT ARE LIST-BOUND CONTROLS?
 Controls that connect to a data source and display the
data
 List-bound controls include the following:
 DropDownList
 ListBox
 CheckBoxList
 RadioButtonList
 DataGrid
 DataList
 Repeater
AN SQL EXAMPLE
<%@Page Language="c#"%>
<%@Import Namespace="System.Data" %>
<%@Import Namespace="System.Data.SqlClient" %>
<html>
<head>
<title> ASP.NET - Data - Data Table <br/>
Using Microsoft SQL Objects</title>
</head>
<body>
<h2>Display of Data in a Table (Grid) Using SQL Objects</h2>
Northwind Employees:<hr/>
<asp:datagrid id="dgrEmployees" runat="server" />
<script Language="c#" runat="server">
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma

Contenu connexe

Tendances

Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverAmmara Arooj
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationRandy Connolly
 
ADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity FrameworkADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity Frameworkdyana0106
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.netHemant Sankhla
 
Building nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesBuilding nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesDavid McCarter
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)David McCarter
 
Asp net interview_questions
Asp net interview_questionsAsp net interview_questions
Asp net interview_questionsBilam
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookMuralidharan Radhakrishnan
 
Step by Step Asp.Net GridView Tutorials
Step by Step Asp.Net GridView TutorialsStep by Step Asp.Net GridView Tutorials
Step by Step Asp.Net GridView TutorialsNilesh kumar Jadav
 
Database application and design
Database application and designDatabase application and design
Database application and designsieedah
 
Data Access Technologies
Data Access TechnologiesData Access Technologies
Data Access TechnologiesDimara Hakim
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08Vivek chan
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010David McCarter
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08Mani Chaubey
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Servicesukdpe
 

Tendances (19)

Chapter 15
Chapter 15Chapter 15
Chapter 15
 
Database Connection
Database ConnectionDatabase Connection
Database Connection
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql server
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
 
ADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity FrameworkADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity Framework
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.net
 
Building nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesBuilding nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework Services
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
Asp net interview_questions
Asp net interview_questionsAsp net interview_questions
Asp net interview_questions
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
 
Step by Step Asp.Net GridView Tutorials
Step by Step Asp.Net GridView TutorialsStep by Step Asp.Net GridView Tutorials
Step by Step Asp.Net GridView Tutorials
 
Database application and design
Database application and designDatabase application and design
Database application and design
 
Olap
OlapOlap
Olap
 
Data Access Technologies
Data Access TechnologiesData Access Technologies
Data Access Technologies
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Services
 
Visual basic databases
Visual basic databasesVisual basic databases
Visual basic databases
 

En vedette

Renounce & Invenio by Sonu Vishwakarma
Renounce & Invenio by Sonu VishwakarmaRenounce & Invenio by Sonu Vishwakarma
Renounce & Invenio by Sonu VishwakarmaSonu Vishwakarma
 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentationSonu Vishwakarma
 
MAC Furniture by Sonu Vishwakarma
MAC Furniture by Sonu VishwakarmaMAC Furniture by Sonu Vishwakarma
MAC Furniture by Sonu VishwakarmaSonu Vishwakarma
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1asim78
 
Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!Ziscko
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NETrchakra
 
Intro, personality, attitude edited
Intro, personality, attitude editedIntro, personality, attitude edited
Intro, personality, attitude editedaakash mehra
 
Chapter 1 - Multimedia Fundamentals
Chapter 1 - Multimedia FundamentalsChapter 1 - Multimedia Fundamentals
Chapter 1 - Multimedia FundamentalsPratik Pradhan
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Organisational behavior
Organisational behavior Organisational behavior
Organisational behavior Payal Deep
 
Organisational behaviour ppt
Organisational behaviour  pptOrganisational behaviour  ppt
Organisational behaviour pptsaransuriyan
 

En vedette (20)

Renounce & Invenio by Sonu Vishwakarma
Renounce & Invenio by Sonu VishwakarmaRenounce & Invenio by Sonu Vishwakarma
Renounce & Invenio by Sonu Vishwakarma
 
9) final report
9) final report9) final report
9) final report
 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentation
 
XML Fundamentals
XML FundamentalsXML Fundamentals
XML Fundamentals
 
Unit 1
Unit 1Unit 1
Unit 1
 
Organizational behavior learning
Organizational behavior  learningOrganizational behavior  learning
Organizational behavior learning
 
MAC Furniture by Sonu Vishwakarma
MAC Furniture by Sonu VishwakarmaMAC Furniture by Sonu Vishwakarma
MAC Furniture by Sonu Vishwakarma
 
Advanced Asp.Net Concepts And Constructs
Advanced Asp.Net Concepts And ConstructsAdvanced Asp.Net Concepts And Constructs
Advanced Asp.Net Concepts And Constructs
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
Unit 1
Unit 1Unit 1
Unit 1
 
Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!Aprenda a conectar sql y c# en 19 sencillos pasos!
Aprenda a conectar sql y c# en 19 sencillos pasos!
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Intro, personality, attitude edited
Intro, personality, attitude editedIntro, personality, attitude edited
Intro, personality, attitude edited
 
Chapter 1 - Multimedia Fundamentals
Chapter 1 - Multimedia FundamentalsChapter 1 - Multimedia Fundamentals
Chapter 1 - Multimedia Fundamentals
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Chapter1
Chapter1Chapter1
Chapter1
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Organisational behavior
Organisational behavior Organisational behavior
Organisational behavior
 
Organisational behaviour ppt
Organisational behaviour  pptOrganisational behaviour  ppt
Organisational behaviour ppt
 

Similaire à ADO .NET by Sonu Vishwakarma

Similaire à ADO .NET by Sonu Vishwakarma (20)

Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
 
Ado
AdoAdo
Ado
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
 
Visual Basic.Net & Ado.Net
Visual Basic.Net & Ado.NetVisual Basic.Net & Ado.Net
Visual Basic.Net & Ado.Net
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
 
Ado Net
Ado NetAdo Net
Ado Net
 
PPT temp.pptx
PPT temp.pptxPPT temp.pptx
PPT temp.pptx
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Practical OData
Practical ODataPractical OData
Practical OData
 
ADO.NET by ASP.NET Development Company in india
ADO.NET by ASP.NET  Development Company in indiaADO.NET by ASP.NET  Development Company in india
ADO.NET by ASP.NET Development Company in india
 
2310 b 09
2310 b 092310 b 09
2310 b 09
 
Introduction to ado.net
Introduction to ado.netIntroduction to ado.net
Introduction to ado.net
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentals
 
Netfx4
Netfx4Netfx4
Netfx4
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
 
Ado.net
Ado.netAdo.net
Ado.net
 

Dernier

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Dernier (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

ADO .NET by Sonu Vishwakarma

  • 1.
  • 3. OVERVIEW  What is .NET?  .NET History.  Introduction to ADO .NET  History of ADO .NET  Using Namespaces  The ADO.net object model  What is DataSet  Accessing the Data with ADO .NET  Data Adapter Object Model  Creating a DataAdapter  Generating a DataSet  Storing Multiple Tables  What are List-Bound Controls?
  • 4. .NET  It erases the boundaries between applications and the Internet. Instead of interacting with an application or a single Web site, .NET will connect the user to an array of computers and services that will exchange and combine objects and data.  A Microsoft operating system platform that incorporates applications, a suite of tools and services the company's Web strategy. There are four main principles of .NET from the perspective of the user:  Software will be rented as a hosted service over the Internet instead of purchased on a store shelf. Essentially, the Internet will be housing all your applications and data.  Users will have access to their information on the Internet from any device, anytime, anywhere.
  • 5. HISTORY .NET Framework Developer(s) Microsoft Initial release 13 February 2002; 12 years ago Latest release 4.5.1 (4.5.50938.18408) / 17 October 2013; 5 months ago Operating system Windows 98 or later,Windows NT 4.0 or later Type Software framework License Proprietary; BCL underMicrosoft Reference Source License [1] Website www.microsoft.com/net
  • 6. INTRODUCTION  ADO Stand form ActiveX Data Object (Network Enable Technology).  It is use for the database connection during the web developing or software developing.  ADO.NET is a set of classes that expose data access services for .NET Framework programmers.  ADO.NET provides a rich set of components for creating distributed, data-sharing applications.  ADO.NET supports a variety of development needs, including the creation of front-end database clients and middle-tier business objects used by applications, tools, languages, or Internet browsers.
  • 7. CONT… ADO.NET provides a set of classes for working with data. ADO.NET provides:  An evolutionary, more flexible successor to ADO  A system designed for disconnected environments  A programming model with advanced XML support  A set of classes, interfaces, structures, and enumerations that manage data access from within the .NET Framework
  • 8. Entity Framework Developer(s) Microsoft Initial release August 11, 2008; 5 years ago Latest release 6.0.2 / December 13, 2013; 3 months ago Written in C# Platform .NET Framework Type Object-relational mapping License Apache License Website msdn.microsoft.com/en- us/data/ef.aspx
  • 9. WHAT'S NEW IN ADO.NET? 1.SqlClient Data provider:-  Streaming support from SQL Server to an application supports scenarios where data on the server is unstructured.  Support has been added for asynchronous programming.  Connection failures will now be logged in the extended events log. 2.ADO.NET Entity Framework :- The .NET Framework 4.5 adds APIs that enable new scenarios when working with the Entity Framework 5.0.
  • 10. USING NAMESPACES  Use the Imports or using statement to import namespaces  Namespaces used with ADO.NET include:  System.Data  System.Data.SqlClient  System.Data.OleDb Imports System.Data Imports System.Data.SqlClient using System.Data; using System.Data.SqlClient;
  • 11. DataSet SQL Server .NET Data Provider OLE DB .NET Data Provider SQL Server 7.0 (and later) OLEDB sources (SQL Server 6.5) OleDbConnection OleDbDataAdapter SqlDataAdapter SqlConnection DataTable DataTable THE ADO.NET OBJECT MODEL
  • 12. SQL Server 2000 DataSet DataTable DataTable Physical storage OleDb Database SqlDataAdapter SqlConnection DataTable Client/Web server memory OleDbDataAdapter OleDbConnection WHAT IS A DATASET?
  • 13. ACCESSING DATA WITH ADO.NET Database 4. Return the DataSet to the Client 5. Client manipulates the data 2. Create the SqlConnection and SqlDataAdapter objects 3. Fill the DataSet from the DataAdapter and close the connection SqlDataAdapter SqlConnection List-Bound Control 1. Client makes request1 2 3 4 5 6. Update the DataSet 7. Use the SqlDataAdapter to open the SqlConnection, update the database, and close the connection 6 7 Client Web server DataSet
  • 14. THE DATAADAPTER OBJECT MODEL sp_SELECT Command SelectCommand UpdateCommand InsertCommand DeleteCommand DataAdapter Command Command Command Connection sp_UPDATE sp_INSERT sp_DELETE Database DataSet DataReader
  • 15.  Store the query in a DataAdapter  The DataAdapter constructor sets the SelectCommand property  Set the InsertCommand, UpdateCommand, and DeleteCommand properties if needed CREATING A DATA ADAPTER Dim da As New SqlDataAdapter _ ("select * from Authors", conn) da.SelectCommand.CommandText da.SelectCommand.Connection SqlDataAdapter da = new SqlDataAdapter ("select * from Authors",conn); da.SelectCommand.CommandText; da.SelectCommand.Connection;
  • 16. GENERATING A DATASET  You can generate a DataSet…  …through the UI…  Creates a DataSet that allows you to access data as an object  …or through code…  and then fill… Dim ds As New DataSet() DataAdapter1.Fill(ds) DataAdapter2.Fill(ds) DataSet ds = new DataSet(); DataAdapter1.Fill(ds); DataAdapter2.Fill(ds);
  • 17. STORING MULTIPLE TABLES  Add the first table  Add the subsequent table(s) daCustomers = New SqlDataAdapter _ ("select * from Customers", conn1) daCustomers.Fill(ds, "Customers") Orders Customers daOrders = New SqlDataAdapter _ ("select * from Orders", conn2) daOrders.Fill(ds, "Orders") conn2conn1 DataSet
  • 18. WHAT ARE LIST-BOUND CONTROLS?  Controls that connect to a data source and display the data  List-bound controls include the following:  DropDownList  ListBox  CheckBoxList  RadioButtonList  DataGrid  DataList  Repeater
  • 19. AN SQL EXAMPLE <%@Page Language="c#"%> <%@Import Namespace="System.Data" %> <%@Import Namespace="System.Data.SqlClient" %> <html> <head> <title> ASP.NET - Data - Data Table <br/> Using Microsoft SQL Objects</title> </head> <body> <h2>Display of Data in a Table (Grid) Using SQL Objects</h2> Northwind Employees:<hr/> <asp:datagrid id="dgrEmployees" runat="server" /> <script Language="c#" runat="server">