ADO.NET
ActiveX Data Objects .NET
ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC. Applications use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain.
ADO.NET Components
The two main components of ADO.NET for accessing and manipulating data are the .NET Framework data providers and the DataSet.
.NET Framework Data Providers
The .NET Framework Data Providers are components that have been explicitly designed for data manipulation and fast, forward-only, read-only access to data.
The
Connectionobject provides connectivity to a data source.The
Commandobject enables access to database commands to return data, modify data, run stored procedures, and send or retrieve parameter information.The
DataReaderprovides a high-performance stream of data from the data source.Finally, the
DataAdapterprovides the bridge between theDataSetobject and the data source. TheDataAdapterusesCommandobjects to execute SQL commands at the data source to both load theDataSetwith data and reconcile changes that were made to the data in theDataSetback to the data source.
DataSet
The ADO.NET DataSet is explicitly designed for data access independent of any data source. As a result, it can be used with multiple and differing data sources, used with XML data, or used to manage data local to the application.
The DataSet contains a collection of one or more DataTable objects consisting of rows and columns of data, and also primary key, foreign key, constraint, and relation information about the data in the DataTable objects.
Last updated