What is ADO.NET?
ADO.Net is framework for interacting with any database/XML document.ADO.Net supports two models for interacting with the database.
Full Form of ADO.Net is (ActiveX Data Objects):
Disconnected Model
Connected Model
Note: Disconnected model establish the connection with database and process the connection implicitly based on the requirement.
Connected Model:
Connected model is used to interact with the database then the connectivity between the application and database is required while performing any navigations or manipulations on the data.
Connection object:
Connection object is used to establish physical connection between the Application and the Database.
Dotnet C# ASP.NET
DataAdapter object:
It is a collection of Command object which acts like an interface or bridge between the Database and the Dataset for transferring the data.
There are two Methods for DataAdapter:
FILL:
FILL is used to read the data from the database based on the SELECT statement of the SelectCommand of DataAdapter and used to fill the DataSet with the retrieved information.
Update:
It is used to read the data from the DataSet and used to update the Database with the information.
DataSet is of two types:
1. Typed DataSet
2. Untyped DataSet
Typed DataSet:
Whenever, a DataSet is defined based on XML Schema Definition (XSD) then it is said to be Typed DataSet.
Untyped DataSet:
Whenever, a DataSet is defined without XML Schema Definition then it is said to be Untyped DataSet.
DataView:
DataView is a logical representation of the data present within the data members of DataSet.
DataReader:
DataReader reads the data from database only in forward direction. The data can only be read but not update.
Command:
Command is used to provide the source for the connection object. By using this command object we can wright SQL Queries
There are three command Objects:
1.ExecuteScalar
2.ExecuteReader
3.ExecuteNonQuery
ExecuteScalar:
Execute Scalar can read only single value from the database like Count,Sum etc
ExecuteNonQuery:
ExecuteNonQuery Execute Insert, Delete, Update SQL Commands and returns the rows affected by the Query.
ADO.Net is framework for interacting with any database/XML document.ADO.Net supports two models for interacting with the database.
Full Form of ADO.Net is (ActiveX Data Objects):
Disconnected Model
Connected Model
Disconnected Model:
Disconnected model is used to interact with the database then the connectivity between the application and database is not required while performing any navigations or manipulations on the data.Note: Disconnected model establish the connection with database and process the connection implicitly based on the requirement.
Connected Model:
Connected model is used to interact with the database then the connectivity between the application and database is required while performing any navigations or manipulations on the data.
Connection object:
Connection object is used to establish physical connection between the Application and the Database.
Dotnet C# ASP.NET
DataAdapter object:
It is a collection of Command object which acts like an interface or bridge between the Database and the Dataset for transferring the data.
There are two Methods for DataAdapter:
FILL:
FILL is used to read the data from the database based on the SELECT statement of the SelectCommand of DataAdapter and used to fill the DataSet with the retrieved information.
Update:
It is used to read the data from the DataSet and used to update the Database with the information.
DataSet:
DataSet is an in-memory representation of the data at the client system in the format of XML. It reads the data in both forward and backward direction Since, a DataSet maintains the information of more than one table, a DataSet is also considered as a collection of Data Tables. Any manipulations performed on the data table of DataSet will not be reflected on the Database.DataSet is of two types:
1. Typed DataSet
2. Untyped DataSet
Typed DataSet:
Whenever, a DataSet is defined based on XML Schema Definition (XSD) then it is said to be Typed DataSet.
Untyped DataSet:
Whenever, a DataSet is defined without XML Schema Definition then it is said to be Untyped DataSet.
DataView:
DataView is a logical representation of the data present within the data members of DataSet.
DataReader:
DataReader reads the data from database only in forward direction. The data can only be read but not update.
Command:
Command is used to provide the source for the connection object. By using this command object we can wright SQL Queries
There are three command Objects:
1.ExecuteScalar
2.ExecuteReader
3.ExecuteNonQuery
ExecuteScalar:
Execute Scalar can read only single value from the database like Count,Sum etc
ExecuteReader:
ExecuteReader can reads row set of data from the database using SELECT statement.ExecuteNonQuery:
ExecuteNonQuery Execute Insert, Delete, Update SQL Commands and returns the rows affected by the Query.