Please enable Javascript to correctly display the contents on Dot Net Tricks!

Introduction to Ado.net

  Author : Shailendra Chauhan
Updated On : 04 Dec 2016
Total Views : 14,212   
 

Before Ado.net we use Ado (Active Database Object) to access data from database. Basically Ado has automatic driver detection technique and it has only one drawback that it only provide a connected environment so efficiency of system may decrease.

ADO.NET is a new database technology used by .Net platform (introduced in 2002). Infact it is a set of classes used to communicate between an application front end and a database.It supports both connected & disconnection mode of data access.

Mandatory Namespaces used in ADO.Net

In any .NET data access page, before you connect to a database, you first have to import all the necessary namespaces that will allow you to work with the objects required. Namespaces used in ADO.Net are :

  1. System.Data

    It contains the common classes for connecting, fetching data from database. Classes are like as DataTable, DataSet, DataView etc.

  2. System.Data.SqlClient

    It contains classes for connecting, fetching data from Sql Server database. Classes are like as SqlDataAdapter,SqlDataReader etc.

  3. System.Data.OracleClient

    It contains classes for connecting, fetching data from Oracle database. Classes are like as OracleDataAdapter,OracleDataReader etc.

  4. System.Data.OleDb

    It contains classes for connecting, fetching data from any database(like msaccess, db2, oracle, sqlserver, mysql). Classes are like as OleDbDataAdapter,OleDbDataReader etc.

  5. System.Data.Odbc

    It contains classes for connecting, fetching data from any database(like msaccess, db2, oracle, sqlserver, mysql). Classes are like as OdbcDataAdapter,OdbcDataReader etc.

Component of ADO.NET architecture

  1. Data Provider

    Data provider is a set of ADO.Net classes that allow us to access a database. Basically, it is a bridge between our application (We can say front-end) and data source. There are following Data Provider :

    1. SqlServer Data Provider:-It is used to access data from SqlServer database (for version 7.0 or later).

    2. Oracle Data Provider:-It is used to access data from oracle database (for version 8i or later).

    3. OleDb Data Provider:-It is used to access data from any database (msaccess, mysql, db2).

    4. Odbc Data Provider :-It is used to access data from any database (msaccess, mysql, db2).

  2. Data Set

    Basically it is a small Data structure that may contain multiple data tables from multiple sources.The information in dataset is created inform of XML and is stored with .xsd extention.It support disconnected mode of data access.It has both scrolling mode means forward and backward scrolling mode (fetching of data).DataSet can have multiple Datatable from multiple sources but DataReader is able to read only single Datatable.


YOU MIGHT LIKE
Free Interview Books
 
COMMENTS (0)
13 FEB
ASP.NET Core Development (online)

07:00 AM-09:00 AM IST( MON, WED, FRI)

Know More
25 JAN
Angular2 and Angular1 Development (online)

09:00 PM-10:30 PM IST(MON-FRI)

Know More
24 JAN
ASP.NET MVC with Angular2 Development (online)

07:00 AM-09:00 AM IST(Tuesday & Thursday)

Know More
21 JAN
Xamarin Forms : Build Cross-platform Apps (offline)

05:00 PM-06:30 PM IST

Know More
20 JAN
NODEJS & MEAN Stack 2 Development (online)

09:00 PM-11:00 PM IST( MON, WED, FRI)

15 JAN
PPC Marketing (offline)

04:00 PM-05:300 PM

10 JAN
ASP.NET MVC with AngularJS Development (online)

09:00 PM-11:00 PM IST on (TUE, THRU,SAT)

3 JAN
ASP.NET MVC with AngularJS Development (online)

07:00 AM-09:00 AM IST

31 DEC
ASP.NET MVC with AngularJS Development (offline)

09:30 AM-11:00 AM

31 DEC
Angular2 and Angular1 Development (offline)

11:00 AM-12:30 AM

26 NOV
ASP.NET MVC with AngularJS Development (offline)

03:00 PM-04:30 PM

5 NOV
ASP.NET MVC with AngularJS Development (offline)

08:00 AM-09:30 AM

4 SEP
MEAN Stack 2 Development (offline)

11:00 AM-12:30 PM.

BROWSE BY CATEGORY
 
RECENT ARTICLES
SUBSCRIBE TO LATEST NEWS
 
LIKE US ON FACEBOOK
 

Professional Speaks

+