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

C# Chapter 5

The document discusses the integration of C# with databases using ADO.NET, which is a part of the .NET Framework that facilitates communication with various data sources. Key ADO.NET components such as SqlConnection, SqlCommand, and DataSet are introduced, along with the DataGridView control for displaying data in a tabular format. It also covers CRUD operations, which are essential for managing persistent storage in database applications.

Uploaded by

Salman Sead
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

C# Chapter 5

The document discusses the integration of C# with databases using ADO.NET, which is a part of the .NET Framework that facilitates communication with various data sources. Key ADO.NET components such as SqlConnection, SqlCommand, and DataSet are introduced, along with the DataGridView control for displaying data in a tabular format. It also covers CRUD operations, which are essential for managing persistent storage in database applications.

Uploaded by

Salman Sead
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11

Programming with Visual C#

Chapter 5

Forms and Databases using ADO.net


Connecting C# with Databases
 You can use C# to write applications that interact
with databases.
 Databases are composed of tables of related
information.
 Each table is organized into rows representing
records and columns containing fields of data.
ADO.NET and C#
 ADO stands for Microsoft ActiveX Data Objects.
ADO.NET is one of Microsoft’s Data Access
Technologies, using which we can communicate with
different data sources.
 It is a part of the .NET Framework, which connects
the .NET Application (Console, WCF, WPF,
Windows, MVC, Web Form, etc.) and different data
sources.
 The Data Sources can be SQL Server, Oracle,
MySQL, XML, etc
ADO.NET Architecture
ADO.NET Components
 There are a number of key classes that are available in
ADO.NET that allows us to work with data in a database.
 Briefly they are:

SqlConnection - specify the connection to the database.

SqlCommand – send SQL statements to the database.

SqlDataReader – obtain results from a SELECT SQL
statement.

DataSet – memory representation of the database.

SqlDataAdapter – exchanges data between a DataSet
and a Database.
ADO.NET Components
DataGridView
 The DataGridView control provides a powerful
and flexible way to display data in a tabular
format.
 You can use the DataGridView control to show
read-only views of a small amount of data, or you
can scale it to show editable views of very large
sets of data.
DataGrid View
Creating a Database Application (GRUD
Operation)
 CRUD stands for create, read, update, and delete.
These are the four basic functions of persistent
storage.
 It can also describe user-interface conventions that
allow viewing, searching, and modifying
information through computer-based forms and
reports.
Simple GRUD Application with
DataGrid View
Thank you

You might also like