Programming MicrosoftВ® OutlookВ® and Microsoft Exchange 2003, Third Edition (Pro-Developer)
The CDO library is a hierarchical library consisting of objects and collections. As you read the chapter, you'll find that some collections have the same name as others even though they contain different objects. However, the information that each collection accesses is specific to the object the collection refers to.
In the CDO library, the Session object is at the highest-level and contains all of the other CDO objects and collections. This makes sense because you need some type of session, either an Exchange Server session or an offline session, to start accessing information stored in an Exchange Server database. Figure 11-1 shows the hierarchy of the CDO library, which begins with the Session object. All other objects are created as children of the CDO Session object.
Note | If you're familiar with ActiveX Data Objects (ADO), it might be helpful to know that the Session object is similar to the ADO Connection object. However, do not confuse the Session object in ASP with the Session object in CDO. They are entirely different objects. |
As you can see from Figure 11-1, the CDO library is quite logical in its layout of collections and objects. Below the Session object are the major collections and objects of the CDO library, such as the InfoStores collection, which contains the data stores for your application, and the AddressLists collection, which contains the address entries your application can use. Below these major collections are other collections, such as the Folders collection, which contains the folders for a particular InfoStore , and the Messages collection, which contains the messages for a particular folder. The CDO library is one of the most approachable Microsoft object libraries; it allows you to quickly build powerful collaborative applications.
Getting Help with the CDO Library
This chapter provides an overview of the CDO library, but you might also want to look at the CDO help file, which provides useful information as well as code samples. The CDO Windows Help file (cdo.hlp) is on the Exchange Server CD and the Outlook CD. The CDO compiled HTML Help file (cdo.chm) is available with the companion content for this book. It is also available as part of the Platform Software Development Kit (SDK) section of the MSDN Library, which you can access online at http://msdn.microsoft.com/library . Also refer to Chapter 12, which contains some tips and tricks for building CDO applications.