Platform SDK: Exchange 2000 Server

CDO Messaging and ADO

[This is preliminary documentation and subject to change.]

CDO for Exchange integrates with ADO 2.5 objects to provide a consistent interface to accessing items in the Web Store. CDO objects are to some degree polymorphs of ADO objects. Like ADO Record and Recordset objects, the Message, CalendarMessage, BodyPart, and CalendarPart objects expose a Fields collection, and a process to access an item's stream. CDO objects facilitate binding to Web Store items through the CDO IDataSource interface Open, SaveTo, and SaveToContainer methods.

[C++,IDL]

The CDO objects listed in the previous section are also polymorphs of OLE DB objects of CoType TRow. You can use this set of interfaces on the CDO object as if it were an instance of an OLE DB Row object. For example, you may write a set of high-performance functions in C++ that operate using a passed IRow interface. If you have a CDO object such as a Message or BodyPart object, you need not create a separate OLE DB Row object to pass to the function. Instead, you can simply pass the IRow interface on the CDO object. If necessary, the function can always determine whether the object is a CDO object by calling QueryInterface for some CDO-specific interface such as IDataSource or IMessage.

The CDO Message and CalendarMessage objects can bind directly to other objects using the IDataSource.OpenObject and IDataSource.SaveToObject methods. The types of objects you should bind to include the following: