The IDataSource Interface

Topic Last Modified: 2006-06-30

The Collaboration Data Objects (CDO) object model defines the core IDataSource Interface for accessing data in other Microsoft® ActiveX® Data Objects (ADO), CDO, and Active Directory Service Interfaces (ADSI) objects, or as saved data in the Exchange store and the Active Directory® directory service. All top-level CDO objects expose an implementation of this interface.

CDO objects are bound to items in the Exchange store by using the Open Method, the SaveTo Method, and the SaveToContainer Method. The Open Method binds to the item, provided by the source URL, and then saves the data from the CDO object to that item. The SaveToContainer Method is similar to SaveTo Method, except that you need only specify the folder (container) in which to save the item. The actual name for the item is a globally unique identifier (GUID) that is generated internally.

All CDO objects provide the ability to bind other CDO, ADO, and ADSI objects. The types of objects that a certain CDO can bind to is not part of the core IDataSource Interface definition, but is left to the particular implementation. Object binding follows a similar pattern to Exchange store item binding. The OpenObject Method first binds the target object and then copies the data in the target object to the opening CDO object. Similarly, the SaveToObject Method first binds the object and then saves the data in the binding CDO object to the target object.

CDO Object   <----- OpenObject ------- Target
CDO Object   -------SaveToObject ----> Target

After a CDO object has been bound to an Exchange store item or another object, changes made within the CDO object can be saved into the bound data source.