ADO.NET architecture

Answer

Data Provider provides objects through which functionalities like opening and closing connection, retrieving and updating data can be availed.

It also provides access to data source like SQL Server, Access, and Oracle).

Some of the data provider objects are:

  • Command object which is used to store procedures.
  • Data Adapter which is a bridge between datastore and dataset.
  • Datareader which reads data from data store in forward only mode.
  • A dataset object is not in directly connected to any data store. It represents disconnected and cached data. The dataset communicates with Data adapter that fills up the dataset. Dataset can have one or more Datatable and relations.  
  • DataView object is used to sort and filter data in Datatable.
ADO.NET architecture - June 06, 2009 at 10:00 AM by Shuchi Gauri

Overview of ADO.NET architecture.

ADO.NET provides access to all kind of data sources such as Microsoft SQL Server, OLEDB, Oracle, XML.

ADO.NET separates out the data access and data manipulation componenets. ADO.NET includes some providers from the .NET Framework to connect to the database, to execute commands, and finally to retrieve results. Those results are either directly used or can be put in dataset and manipulate it.

Define connected and disconnected data access in ADO.NET

Data reader is based on the connected architecture for data access. Does not allow data manipulation

Dataset supports disconnected data access architecture. This gives better performance results.

Define connected and disconnected data access in ADO.NET

Data reader is based on the connected architecture for data access. Does not allow data manipulation

Dataset supports disconnected data access architecture. This gives better performance results.

Describe CommandType property of a SQLCommand in ADO.NET.

CommandType is a property of Command object which can be set to Text, Storedprocedure. If it is Text, the command executes the database query. When it is StoredProcedure, the command runs the stored procedure. A SqlCommand is an object that allows specifying what is to be performed in the database.

Access database at runtime using ADO.NET

SqlConnection sqlCon = new SqlConnection(connectionString)
sqlCon.Open();
string strQuery = "select CategoryName from abcd";
SqlCommand cmd = new SqlCommand(strQuery, conn);
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
        Console.WriteLine(reader [0]);
}
reader.Close();
con.Close();

All ado.net Questions

Ask your interview questions on ado-net

Write Your comment or Questions if you want the answers on ado-net from ado-net Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---