Ado.net Answer
Ado.net Answer
net
1. What is Ado.net ?
Ado.net stands Microsoft ActiveX Data Objects.
Ado.net is a set classes that can be used to interact with data sources like
database and XML.
4. What is SqlCommand ?
SqlCommand class is used to prepare an Sql statement or Store Procedure that
we want to execute on Sql server database.
There are three methods of SqlCommand class which are commonly used :
a) ExecuteScalar : Used when query returns single value.
b) ExecuteReader : Used when query returns more than one value.
c) ExecuteNonScalar : Used when we want to perform an Insert, Update or
Delete operations.
5. What is SqlDataReader ?
SqlDataReader reads data in the most efficient manner.
SqlDataReader is connection oriented means it requires an active and open
connection to the data source while reading the data.