SlideShare a Scribd company logo
1 of 16
Download to read offline
Programming Data
(ADO.Net, Linq, EF)
Eng. Mahmoud Ouf
Lecture 1
mmouf@2018
Introduction to ADO.Net
ADO.NET is a set of classes exposing data access services to .NET
programmers, providing a rich set of components for creating distributed,
data-sharing applications.
ADO.NET is an integral part of the .NET Framework and provides access to
relational, XML, and application data.
ADO.NET classes are found in System.Data.dll.
ADO.NET helps connect the UI, or presentation layer, of your application
with the data source or database.
ADO.NET is a completely new data access technology, with a new design
that was built entirely from scratch.
mmouf@2018
Dealing with Database
To Deal with the Database, there are two approaches:
Connected Model:
In which we maintain an open connection with the database while
performing Database transactions
Disconnected Model:
In which we open connection with the database, retrieve the database
(Tables, Relations, Columns, Rows, …) to the Memory then close the
connection.
Perform the database transaction on the database copy in the memory
Then, open the database connection and return the updates to the real
Database
mmouf@2018
ADO .Net Data Architecture
mmouf@2018
Application Memory
ADO.Net
Database
IDbDataAdaptor IDbCommand IDataReader
IDbConnection
ADO .Net Namespaces
mmouf@2018
NameSpace Description
System.Data
Classes, interfaces, delegates, and
enumerations that define and partially
implement the ADO.NET architecture
System.Data.Common Classes shared by .NET Framework data
providers
System.Data.OleDb The .NET Framework data provider for OLE
DB
System.Data.SqlClient The .NET Framework data provider for SQL
Server
Working with Disconnected Model (DataSet)
In today’s complex distributed application environments, it is not possible to
rely on a dedicated database connection to retrieve and modify data.
To solve this issue, use ADO.NET’s disconnected architecture; it offers
flexible application design and helps organizations save database
connections.
Hence, data can be retrieved and then stored locally on the device in the
form of a DataSet object.
The retrieved DataSet can be modified by users on their local devices, then
they can sync the changes into the central data source.
Disconnected architecture utilizes expansive resources like Connection in a
very optimum way (that is, to open late and close early).
mmouf@2018
Working with Disconnected Model (DataSet)
It is a disconnected, in-memory representation of data. When appropriate,
The Data Set can act as a template for updating the central database.
The DataSet object contains a collection of zero or more DataTable objects.
Each is an in memory representation of a single table.
The DataTable is defined by DataColumns collection and the Constrains
Collections. These two makes up the schema of the table. A DataTable
contains a DataRows Collections.
The DataSet contains a DataRelations collections (allows the creation of
association between one table and rows in another tables.
mmouf@2018
Working with Disconnected Model (DataSet)
mmouf@2018
DataSetDataSet
Collection of TablesCollection of Tables
Collection of RelationsCollection of Relations
TableTable
Collection of ColumnsCollection of Columns
ColumnColumn
Collection of RowsCollection of Rows
RowRow
Collection of ConstrainsCollection of Constrains
ConstrainConstrain
RelationRelation
Working with Disconnected Model (DataSet)
Create a DataSet
DataSet ds = new DataSet(“MyDataSet”);
Create 2 tables (Employee) and (Department)
DataTable Emp = new DataTable(“Employee”);
DataTable Dept = new DataTable (Department”);
Create 5 column
DataColumn EmpId = new DataColumn(“ID”,
Type.GetType(“System.Int32”));
DataColumn EmpName = new DataColumn(“Name”,
Type.GetType(“System.string));
DataColumn EmpDeptId = new DataColumn(“DeptID”,
Type.GetType(“System.Int32”));
DataColumn DeptId = new DataColumn(“ID”,
Type.GetType(“System.Int32”));
DataColumn DeptName = new DataColumn(“Name”,
Type.GetType(“System.string));mmouf@2018
Working with Disconnected Model (DataSet)
Add 3 to table “Employee” and 2 to table “Department”
Dept.Columns.Add(DeptId);
Dept.Columns.Add(DeptName);
Emp.Columns.AddRange(New DataColumns[]{EmpId, EmpName,
EmpDeptId});
Add the 2 tables to the dataset
ds.Tables.Add(Emp);
ds.Tables.Add(Dept);
Create a Relation
DataRelation dr = new DataRelation(“EmpDept”, DeptId, EmpDeptId);
Add the relation to the DataSet
ds.DataRelations.Add(dr);
mmouf@2018
Working with Disconnected Model (DataSet)
Create Rows
DataRow dRow = Emp.NewRow();
dRow[0] = 1;
dRow[“Name”] = “Aly”;
Add rows to the Table
Emp.Rows.Add(dRow);
mmouf@2018
Working with Disconnected Model (DataSet)
We can create a DataSet in the memory that represent an image of a real database.
This will help to have an offline image of database in the memory in a way that make it
easy to deal with then update the real database.
This is done through the use of DataAdaptor
mmouf@2018
DataSet (memory)
Data Source
(Database)
DataAdapter
DataAdapter
When you first instantiate a data set, it contains no data.
You obtain a populated data set by passing it to a data adapter, which takes care of
connection details and is a component of a data provider.
A data set isn’t part of a data provider.
The data set needs a data adapter to populate it with data and to support access to the data
source.
mmouf@2018
DataAdapter
DataAdapter has 4 important properties represent the database command:
SelectCommand
InsertCommand
UpdateCommand
Delete Command
Also, it has 2 important methods
Fill(): which is used to transfer the data from database to dataset
Update(): which is used to transfer the data from dataset to database
mmouf@2018
DataAdapter
mmouf@2018
DataSetDatabase
Fill()
SelectCommand
Update()
InsertCommand
UpdateCommand
DeleteCommand
Working with DataAdapter
1. Create Object From DataAdapter (dAdapt)
2. Create Object From DataSet (ds)
3. Open the connection with the database
4. Call the Fill() method (dAdapt.Fill(ds)), this will use the SelectCommad
5. Close the connection with the database
6. Process the dataset
7. Open the connection with the database
8. Call the Update() method (dAdapt.Update()), this will use the
InsertCommad, UpdateCommand, DeleteCommand
9. Close the connection with the database
mmouf@2018

More Related Content

What's hot

Ado.net & data persistence frameworks
Ado.net & data persistence frameworksAdo.net & data persistence frameworks
Ado.net & data persistence frameworks
Luis Goldster
 
Database programming in vb net
Database programming in vb netDatabase programming in vb net
Database programming in vb net
Zishan yousaf
 
Ado.net session01
Ado.net session01Ado.net session01
Ado.net session01
Niit Care
 
Ado.net xml data serialization
Ado.net xml data serializationAdo.net xml data serialization
Ado.net xml data serialization
Raghu nath
 
Ado.net session07
Ado.net session07Ado.net session07
Ado.net session07
Niit Care
 
ADO.NET -database connection
ADO.NET -database connectionADO.NET -database connection
ADO.NET -database connection
Anekwong Yoddumnern
 

What's hot (20)

Ado.net & data persistence frameworks
Ado.net & data persistence frameworksAdo.net & data persistence frameworks
Ado.net & data persistence frameworks
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
Chap14 ado.net
Chap14 ado.netChap14 ado.net
Chap14 ado.net
 
Ado.net
Ado.netAdo.net
Ado.net
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
Ado.net
Ado.netAdo.net
Ado.net
 
Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
L6 structure
L6 structureL6 structure
L6 structure
 
2310 b 09
2310 b 092310 b 09
2310 b 09
 
Database programming in vb net
Database programming in vb netDatabase programming in vb net
Database programming in vb net
 
Ado.net session01
Ado.net session01Ado.net session01
Ado.net session01
 
Ado .net
Ado .netAdo .net
Ado .net
 
Ado.net xml data serialization
Ado.net xml data serializationAdo.net xml data serialization
Ado.net xml data serialization
 
Ado.net session07
Ado.net session07Ado.net session07
Ado.net session07
 
ADO.NET -database connection
ADO.NET -database connectionADO.NET -database connection
ADO.NET -database connection
 
Ado.net
Ado.netAdo.net
Ado.net
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 

Similar to Intake 38 data access 1

Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
Harman Bajwa
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma
Sonu Vishwakarma
 

Similar to Intake 38 data access 1 (20)

Intake 37 10
Intake 37 10Intake 37 10
Intake 37 10
 
Disconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NETDisconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NET
 
What is ado .net architecture_.pdf
What is ado .net architecture_.pdfWhat is ado .net architecture_.pdf
What is ado .net architecture_.pdf
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
 
Ado
AdoAdo
Ado
 
PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#
 
Tableau interview questions and answers
Tableau interview questions and answersTableau interview questions and answers
Tableau interview questions and answers
 
Asp.net interview questions
Asp.net interview questionsAsp.net interview questions
Asp.net interview questions
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
 
Introduction to ado.net
Introduction to ado.netIntroduction to ado.net
Introduction to ado.net
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma
 
Data structures and algorithms short note (version 14).pd
Data structures and algorithms short note (version 14).pdData structures and algorithms short note (version 14).pd
Data structures and algorithms short note (version 14).pd
 
My tableau
My tableauMy tableau
My tableau
 
Tableau interview questions
Tableau interview questionsTableau interview questions
Tableau interview questions
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)
 
Phd coursestatalez2datamanagement
Phd coursestatalez2datamanagementPhd coursestatalez2datamanagement
Phd coursestatalez2datamanagement
 
Csharp_dotnet_ADO_Net_database_query.pptx
Csharp_dotnet_ADO_Net_database_query.pptxCsharp_dotnet_ADO_Net_database_query.pptx
Csharp_dotnet_ADO_Net_database_query.pptx
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
unit 3.docx
unit 3.docxunit 3.docx
unit 3.docx
 

More from Mahmoud Ouf (20)

Relation between classes in arabic
Relation between classes in arabicRelation between classes in arabic
Relation between classes in arabic
 
Intake 38 data access 5
Intake 38 data access 5Intake 38 data access 5
Intake 38 data access 5
 
Intake 38 data access 3
Intake 38 data access 3Intake 38 data access 3
Intake 38 data access 3
 
Intake 38 12
Intake 38 12Intake 38 12
Intake 38 12
 
Intake 38 11
Intake 38 11Intake 38 11
Intake 38 11
 
Intake 38 9
Intake 38 9Intake 38 9
Intake 38 9
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
 
Intake 38 7
Intake 38 7Intake 38 7
Intake 38 7
 
Intake 38 6
Intake 38 6Intake 38 6
Intake 38 6
 
Intake 38 5 1
Intake 38 5 1Intake 38 5 1
Intake 38 5 1
 
Intake 38 5
Intake 38 5Intake 38 5
Intake 38 5
 
Intake 38 4
Intake 38 4Intake 38 4
Intake 38 4
 
Intake 38 3
Intake 38 3Intake 38 3
Intake 38 3
 
Intake 38 2
Intake 38 2Intake 38 2
Intake 38 2
 
Intake 38_1
Intake 38_1Intake 38_1
Intake 38_1
 
Intake 37 DM
Intake 37 DMIntake 37 DM
Intake 37 DM
 
Intake 37 ef2
Intake 37 ef2Intake 37 ef2
Intake 37 ef2
 
Intake 37 ef1
Intake 37 ef1Intake 37 ef1
Intake 37 ef1
 
Intake 37 linq3
Intake 37 linq3Intake 37 linq3
Intake 37 linq3
 
Intake 37 linq2
Intake 37 linq2Intake 37 linq2
Intake 37 linq2
 

Recently uploaded

Recently uploaded (20)

Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Intake 38 data access 1

  • 1. Programming Data (ADO.Net, Linq, EF) Eng. Mahmoud Ouf Lecture 1 mmouf@2018
  • 2. Introduction to ADO.Net ADO.NET is a set of classes exposing data access services to .NET programmers, providing a rich set of components for creating distributed, data-sharing applications. ADO.NET is an integral part of the .NET Framework and provides access to relational, XML, and application data. ADO.NET classes are found in System.Data.dll. ADO.NET helps connect the UI, or presentation layer, of your application with the data source or database. ADO.NET is a completely new data access technology, with a new design that was built entirely from scratch. mmouf@2018
  • 3. Dealing with Database To Deal with the Database, there are two approaches: Connected Model: In which we maintain an open connection with the database while performing Database transactions Disconnected Model: In which we open connection with the database, retrieve the database (Tables, Relations, Columns, Rows, …) to the Memory then close the connection. Perform the database transaction on the database copy in the memory Then, open the database connection and return the updates to the real Database mmouf@2018
  • 4. ADO .Net Data Architecture mmouf@2018 Application Memory ADO.Net Database IDbDataAdaptor IDbCommand IDataReader IDbConnection
  • 5. ADO .Net Namespaces mmouf@2018 NameSpace Description System.Data Classes, interfaces, delegates, and enumerations that define and partially implement the ADO.NET architecture System.Data.Common Classes shared by .NET Framework data providers System.Data.OleDb The .NET Framework data provider for OLE DB System.Data.SqlClient The .NET Framework data provider for SQL Server
  • 6. Working with Disconnected Model (DataSet) In today’s complex distributed application environments, it is not possible to rely on a dedicated database connection to retrieve and modify data. To solve this issue, use ADO.NET’s disconnected architecture; it offers flexible application design and helps organizations save database connections. Hence, data can be retrieved and then stored locally on the device in the form of a DataSet object. The retrieved DataSet can be modified by users on their local devices, then they can sync the changes into the central data source. Disconnected architecture utilizes expansive resources like Connection in a very optimum way (that is, to open late and close early). mmouf@2018
  • 7. Working with Disconnected Model (DataSet) It is a disconnected, in-memory representation of data. When appropriate, The Data Set can act as a template for updating the central database. The DataSet object contains a collection of zero or more DataTable objects. Each is an in memory representation of a single table. The DataTable is defined by DataColumns collection and the Constrains Collections. These two makes up the schema of the table. A DataTable contains a DataRows Collections. The DataSet contains a DataRelations collections (allows the creation of association between one table and rows in another tables. mmouf@2018
  • 8. Working with Disconnected Model (DataSet) mmouf@2018 DataSetDataSet Collection of TablesCollection of Tables Collection of RelationsCollection of Relations TableTable Collection of ColumnsCollection of Columns ColumnColumn Collection of RowsCollection of Rows RowRow Collection of ConstrainsCollection of Constrains ConstrainConstrain RelationRelation
  • 9. Working with Disconnected Model (DataSet) Create a DataSet DataSet ds = new DataSet(“MyDataSet”); Create 2 tables (Employee) and (Department) DataTable Emp = new DataTable(“Employee”); DataTable Dept = new DataTable (Department”); Create 5 column DataColumn EmpId = new DataColumn(“ID”, Type.GetType(“System.Int32”)); DataColumn EmpName = new DataColumn(“Name”, Type.GetType(“System.string)); DataColumn EmpDeptId = new DataColumn(“DeptID”, Type.GetType(“System.Int32”)); DataColumn DeptId = new DataColumn(“ID”, Type.GetType(“System.Int32”)); DataColumn DeptName = new DataColumn(“Name”, Type.GetType(“System.string));mmouf@2018
  • 10. Working with Disconnected Model (DataSet) Add 3 to table “Employee” and 2 to table “Department” Dept.Columns.Add(DeptId); Dept.Columns.Add(DeptName); Emp.Columns.AddRange(New DataColumns[]{EmpId, EmpName, EmpDeptId}); Add the 2 tables to the dataset ds.Tables.Add(Emp); ds.Tables.Add(Dept); Create a Relation DataRelation dr = new DataRelation(“EmpDept”, DeptId, EmpDeptId); Add the relation to the DataSet ds.DataRelations.Add(dr); mmouf@2018
  • 11. Working with Disconnected Model (DataSet) Create Rows DataRow dRow = Emp.NewRow(); dRow[0] = 1; dRow[“Name”] = “Aly”; Add rows to the Table Emp.Rows.Add(dRow); mmouf@2018
  • 12. Working with Disconnected Model (DataSet) We can create a DataSet in the memory that represent an image of a real database. This will help to have an offline image of database in the memory in a way that make it easy to deal with then update the real database. This is done through the use of DataAdaptor mmouf@2018 DataSet (memory) Data Source (Database) DataAdapter
  • 13. DataAdapter When you first instantiate a data set, it contains no data. You obtain a populated data set by passing it to a data adapter, which takes care of connection details and is a component of a data provider. A data set isn’t part of a data provider. The data set needs a data adapter to populate it with data and to support access to the data source. mmouf@2018
  • 14. DataAdapter DataAdapter has 4 important properties represent the database command: SelectCommand InsertCommand UpdateCommand Delete Command Also, it has 2 important methods Fill(): which is used to transfer the data from database to dataset Update(): which is used to transfer the data from dataset to database mmouf@2018
  • 16. Working with DataAdapter 1. Create Object From DataAdapter (dAdapt) 2. Create Object From DataSet (ds) 3. Open the connection with the database 4. Call the Fill() method (dAdapt.Fill(ds)), this will use the SelectCommad 5. Close the connection with the database 6. Process the dataset 7. Open the connection with the database 8. Call the Update() method (dAdapt.Update()), this will use the InsertCommad, UpdateCommand, DeleteCommand 9. Close the connection with the database mmouf@2018