Share via


Using CDOEXM with Non-Exchange Stores

Using CDOEXM with Non-Exchange Stores

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 CDO for Exchange Management (CDOEXM) objects included with Microsoft® Exchange Server 2003 support management of Exchange stores and other non-Exchange based stores.

Use the DataSource.Open method to obtain a URL for accessing the URL.

Visual Basic

    Dim objSv as new CDOEXM.ExchangeServer
    objSV.DataSource.Open("SERVERNAME")

If your applications use the ExchangeServer CoClass object to manage stores, you can open the CDOEXM data source using the DNS name of the server in addition to a user interface (UI). When a store is opened using the computer name, applications can manage the store using the ExchangeServer CoClass object even if the store being accessed is not Exchange-based.

When the DataSource.Open command completes, the contents of the SourceURL property will vary depending on the type of Exchange store opened. Exchange servers use the LDAP:// protocol specifier in the URL, while non-Exchange-based servers use the file:// protocol specifier. The following table shows SourceURLs in the format returned by an Exchange-based store and by a store that is not Exchange-based. Your application would see installation-specific values for SERVERNAME, OrganizationName, and UpperLevelDomain.

Exchange Store Type DataSource.SourceURL
Exchange LDAP://SERVERNAME/CN=SERVERNAME,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services, CN=Configuration,DC=OrganizationName,DC=UpperLevelDomain
Non-Exchange file://SERVERNAME/CN=SERVERNAME,CN=Servers

Server configuration data for both Exchange store types can be accessed using the base URL returned in the SourceURL property, and your application does not need to know in advance what type of system it is accessing.

Because the different Exchange store types use different protocol specifiers, your management applications should avoid changing the protocol, should avoid using hard-coded base URLs, and should avoid assuming that there is an unchanging container organization inside an Exchange store. Instead, use Collaboration Data Objects (CDO) with Microsoft ActiveX® Data Objects (ADO) and CDOEXM to navigate the stores, folders, and other objects.

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.