ADO+ is an evolutionary improvement to Microsoft ActiveX Data Objects (ADO). It is a standards-based programming model for creating distributed, data-sharing applications.
The centerpiece of any software solution using ADO+ is the data set. A data set is an in-memory copy of database data. A data set contains any number of data tables, each of which typically corresponds to a database table or view. A data set constitutes a "disconnected" view of the database data. That is, it can exist in memory without an active connection to the database (or databases) containing the corresponding tables or views.
At run time, Components can exchange data sets. That is, one component can transmit a data set to another component. For example, a CustomerOrder
component can contain a data set with details about an order and the customer who made it. The component can include business logic enforcing rules about order processing. That component can transmit the data set to a user-interface component (a WinForm or Web Form, for example) for display to a user.
To accommodate the exchange of data sets among components, ADO+ uses an XML-based persistence and transmission format. That is, to transmit a data set from one component to another, an ADO+ solution expresses the in-memory data (the data set) as an XML file, and then sends the XML file to the other component.
You manipulate the contents of a data set through the DataSet object. The DataSet object lets you manipulate the contents of the data set with methods that are consistent with the relational model. For example, the DataSet object has a collection of DataTable objects, and each DataTable object has columns, rows, and relationships to other DataTable objects. When a component transmits a data set to another component, the receiving component materializes the received data set as a DataSet object.
Besides transmitting data sets among components, an ADO solution must coordinate activities between the data set and the corresponding database tables. For example, to materialize data set with pricing information from a PriceList
database table, a solution must retrieve the information from the database and put it in the appropriate DataTable object within the dataset. Similarly, if the component allows users to change prices, the solution must transmit the updated prices to the database.
To accommodate the exchange of data between data sets and the underlying data sources, an ADO+ solution uses an object called a data set command. Microsoft provides two data set command objects:
This object mediates communication between a table within a data set and a table or view in a SQL Server database. SQL Server 7.0 and later are currently supported.
This object mediates communication between a table within a data set and a table or view in any data source that has an OLE DB provider.
The following illustration shows the major components of an ADO+ solution.