Database Reference
In-Depth Information
Connected Data Objects
ADO.NET's connected architecture relies on a consistent database connection to access data and
perform any operations on the retrieved data. ADO.NET offers the following objects to help you build
your application with a connected architecture:
Connection : This is the main, or core, object for any database-oriented application.
As you might imagine, without knowing a data source's statistics such as where it
is located, what database you would like to connect with, what user name and
password it requires, and so on, it would be impossible to establish a connection
and perform any data-related activity. Each .NET provider provides its own
Connection object that offers features targeted to specific data sources.
Command : This object represents the handling of statements that your application
will be using to perform data-oriented tasks, such as reading data or inserting or
modifying data. Hence, any SQL statement is actually executed via a Command
object.
DataReader : DataReader involves creating an instance of the Command object and
then creating a DataReader by calling Command.ExecuteReader for data retrieval
from your data source, the returned data can be fetched in a read-only way
through a DataReader object. Data retrieval behavior of DataReader is also known
as a read-forward-only fire-hose cursor with fast speed .
Parameter : Parameter has always been an important part of any programming
model. Similarly, it is important in ADO.NET programming when it comes to
passing values to Command . A Parameter can be a value passed or returned to/from a
stored procedure or an argument passed to a SQL query.
DataAdapter : DataAdapter is the object ADO.NET exposes to bridge the gap
between connected and disconnected architectures to let applications establish a
connection and sync data into and from the data source.
Disconnected Data Objects
ADO.NET's connected architecture relies on a consistent database connection to access data and
perform any operations on the retrieved data. However, in today's complex distributed application
environments, it is not possible to rely on a dedicated database connection to retrieve and modify data.
To help you meet your business requirements and work with ease in your distributed environment,
you can utilize ADO.NET's disconnected architecture; it offers flexible application design and helps
organizations save database connections. Hence, data can be retrieved and then stored locally on the
device in the form of a DataSet object. The retrieved DataSet can be modified by users on their local
devices such as laptops, handhelds, tablets, and so on, and once that's done, they can sync the changes
into the central data source. Disconnected architecture utilizes expansive resources like Connection in a
very optimum way (that is, to open late and close early).
ADO.NET offers the following objects to help you build your application with a disconnected
architecture:
 
Search WWH ::




Custom Search