Data Sources and Binding

Data Sources and Binding

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The term data source is intended to be generic, meaning any object or store that can act as a repository of data. Examples of data sources include Collaboration Data Objects (CDO) objects, Microsoft® ActiveX® Data Objects (ADO) objects, Exchange store items, and Microsoft Active Directory® objects. The term binding refers to the state of two objects being associated, or linked, at run time. When you use an OLE DB provider to create or modify an item in the Exchange store, you first bind the object in the store, and then make changes to its properties or streams. After the data source is bound, the data in the data source can be modified, deleted, created, and so on.

After a binding has occurred, there are two copies of data present: the data in the binding object (the binder) and the data source. For example, when you use an ADO Record object to bind to an existing item in the Exchange store, the data in the Record object is a copy of the data in the store. Similarly, when you use a CDO Message CoClass to bind to an ADO Record object, the data in the Record object is copied to the Message CoClass. When you make changes to the data in the binding object, these changes are not saved back to the data source automatically; you must commit the changes by using an appropriate method call.

Both ADO and CDO objects can bind to items in the Exchange store by using an appropriate OLE DB provider. Thus, both ADO and CDO objects can have Exchange store items as data sources. CDO objects, on the other hand, can have other objects as data sources. For example, a CDO Message CoClass can bind to an ADO Record object, an ADO Stream object, a CDO body part object, or any object exposing an implementation of the IStream interface.

The following topic contains information about the IDataSource Interface:

The IDataSource Interface

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.