Platform SDK: Exchange 2000 Server

OLE DB and ADO Access

[This is preliminary documentation and subject to change.]

A new, high-performance OLE DB 2.5 provider, Exoledb.dll, is installed with Microsoft Exchange 2000 Server and can be used on the local host to access Web Store resources. By using this provider, programmers can take advantage of the many OLE DB- or ADO-based tools and technologies available for manipulating Web Store resources.

The Web Store ascertains protocol information from the protocol portion of the URL, such as http:// or file:\\, and automatically uses a root-binder mechanism to establish data connections with the Web Store database. This feature eliminates the need for an ADO Connection object, allowing Record objects to be immediately instantiated from Web Store items and folders. Recordset objects that are based on SQL queries can have their connection based on the ActiveSource value of a Record object. However, explicitly setting Connection objects is advantageous under some circumstances, such as when handling transactions and errors.

Only processes running on the local computer can use the OLE DB provider. You cannot use DCOM to create ADO or OLE DB objects to access the Web Store remotely, nor can you send remote calls through the provider to other computers. To access Web Store contents remotely, you must use either the WebDAV protocol or the Messaging API (MAPI) with CDO 1.2.1.

The following table summarizes how particular ADO 2.5 objects can be used effectively in Web Store applications. Note that a Web Store item can also be a folder; a folder is an item that is defined as a collection.

ADO 2.5 Object Web Store implementations and capablitites
Record Allows you to automatically create a Record object from a Web Store item by using the item's URL.
Dim R As New ADODB.Record
'Assume strURL as a valid URL
R.Open strURL 
Stream Enables you to work with a Web Store item in a serialized fashion. You can access, modify, replace, or save a Web Store item's stream.

Obtain a Record object’s stream as follows (using the R object from the Record example above):

Dim S As New ADODB.Stream
S.Open R, adModeRead, adOpenStreamFromRecord
Connection Provides capabilities for handling a transaction and errors. Not explicitly needed to instantiate a Record object.
Recordset Contains rows of data, usually returned from an SQL SELECT statement with optional WHERE clauses and sort orders. Web Store SQL traverses the Web Store hierarchy specified by a scope. Scopes in particular are a shallow traversal of a specified folder, and a deep traversal that includes a recursive descent of all subfolders.

You can work independently on a record as part of a recordset in ADO 2.5.

If a Record object is based on a folder, its GetChildren method returns a recordset of all items in the folder. Although this method can be useful for folders with a manageable set of items, issuing a SQL SELECT statement can be more efficient for obtaining a pertinent set of records.

Fields Enables you to access all properties associated with a Web Store item regardless of whether an item has a predefined property definition.

The other ADO objects, Command, Parameters, and Errors, provide additional capabilities, such as handling transactions to Web Store applications.