Expose 104038
Expose 104038
CONNECTING AN
ADO.NET TOPIC
APPLICATION TO
A SQL DB
2
TABLE OF CONTENT
-WHAT IS ADO.NET
-BENEFITS OF ADO.NET
-CONNECTION ARCHITECTURES
WHAT IS ADO.NET?
BENEFITS OF ADO.NET
Interoperability
Scalability
Productivity
Performance
VARIOUS CONNECTION
ARCHITECTURES
UNDERSTANDING
ADO.NET AND IT'S
CLASS LIBRARY
In this diagram, we can see
that there are various types of
applications (Web Application,
Console Application, Windows
Application and so on) that use
ADO.NET to connect to
databases (SQL Server, Oracle,
OleDb, ODBC, XML files and so
on).
8
IMPORTANT CLASSES IN
ADO.NET
1.Connection Class
2.Command Class
3.Data Reader Class
4.Data Adaptor Class
5.Data Set Class
9
1. CONNECTION
CLASS
2. COMMAND CLASS
3. DATAREADER CLASS
4. DATAADAPTER CLASS
5. DATASET CLASS
SQL SERVER
SQL SERVER
HOW TO INSTALL
MICROSOFT SQL SERVER
18
STEP 1
https://www.microsoft.com/en-us/sql-server/sql-
server-downloads
19
STEP 2
STEP 3
STEP 4
Now it will start
downloading SQL
Server installation
media. It will take
some time based on
your internet
connection speed.
22
STEP 5
After successful
download of
installation media,
you will see the
below screen. Click
the Close button.
23
STEP 1
STEP 2
Once extraction is
completed, double click
on the setup.exe file
and you will see the
below screen. Click on
the Installation option in
the left panel and then
click on New SQL
Server stand-alone
installation or add
features to an existing
installation option from
the right panel.
26
STEP 3
Now you will see
the Product
Key window. Select
the Developer option
from the dropdown
and click on
the Next button.
27
STEP 4
Now you will see
the License
Terms window.
Just select the
checkbox and click
on
the Next button.
28
STEP 5
STEP 6
STEP 7
STEP 8
On the Feature Selection window, select features as shown in
the below screenshot. You can also change the location for SQL
Server instance installation but I will go with the default location.
After feature selection please click the Next button.
32
STEP 9
It will check some
feature
rules/prerequisites
and then you will see
the Instance
Configuration screen
. Here you can choose
between Default
Instance and Named
Instance. Here I will
go with Named
Instance.
33
NOTE
Default Instance
When SQL Server is installed in the default instance, it does not require a client to
specify the name of the instance to make a connection. The client only has to know
the server name. For example, HARDIK-PC.
Named Instance
A named instance is identified by the network name of the computer plus the
instance you specify during the installation. The client must specify both the server
name and the instance name when connecting. For
example, HARDIK-PC/MSSQLSERVER.
34
STEP 10
STEP 11
Next, you will see
the Database Engine
Configuration window. In
the Server
Configuration tab,
choose Mixed Mode in the
authentication mode section
and enter a strong password.
In Specify SQL Server
administrators section,
your current windows user
should already be added
automatically. If not, click
36
STEP 12
Next, the setup will
check some feature
configuration rules, and
then the Ready to
Install window will
appear. This window
shows the summary of
all the features and
configurations which we
have done in the above
steps. Once review the
summary and click on
the Install button.
37
STEP 13
Now, the
installation will
start and it may
take some time
based on our
configurations.
38
STEP 14
After installation, it
will show you the
list of features and
their installation
status. If any error
occurred, it will
show here.
39
STEP 1
https://learn.microsoft.com/en-us/sql/ssms/download-sql-
server-management-studio-ssms?view=sql-server-ver16
41
STEP 2
STEP 3
Run the downloaded
file and you will see
below screen. Just
click on
the Install button.
43
STEP 4
STEP 5
Once installation
finished, close the
installation wizard
and open start menu
and search for SQL
Server
Management
Studio. You will see
below application.
Now, click on it to
open the application.
45
HOW TO CONNECT TO A
DATABASE USING ADO.NET