ADO.net_Object_model
ADO.net_Object_model
The ADO.NET object model provides an API for accessing database systems
programmatically.
All ADO.NET related functionality appears under the System.Data
namespace.
Data Access in ADO.NET relies on two components :
A
DO.NET Object Model
NET Data Providers:
A. Connection
B. Command
C. Data Reader
D. Data Adapter
A. Connection:
o This is the object that allows you to establish a connection with the
data source.
o Depending on the actual .NET Data Provider involved, connection
objects automatically pool physical databases connections for you.
o Examples of connection objects are OleDbConnection, SqlConnection,
OracleConnection and so on.
B. Command:
C. Data Reader:
o This object is designed to help you retrieve and examine the rows
returned by the query as quickly as possible.
o DataReader object examines the results of a query one row at a time.
When you move forward to the next row, the contents of the previous
row are discarded.
o The DataReader doesn’t support updating. The data returned by the
DataReader is read-only. Because the DataReader object supports
such a minimal set of features, it is extremely fast and lightweight.
o The disadvantage of using a DataReader object is that it requires an
open database connection and increases network activity.
D. DataAdapter:
DataSet :