Data Flow Between Outlook and SQL Server

The natural data flow from Microsoft Outlook is to Microsoft Exchange Server. The CML/LitCrit application adds a new storage location for this data (Microsoft SQL Server), through the Microsoft Exchange Server Event Service and the application's COM components. CML/LitCrit saves indications of the status of critiques and the overall rating of approved critiques to the FmLib SQL Server database.

This application writes to SQL Server when a critique's state changes from nonexistent to submitted, from submitted to approved, and from submitted to rejected. The Critique table was added to the original CML application's FmLib database to store this critique data.

Data is written using ADO, from Visual Basic® Scripting Edition (VBScript) code. This script, an agent of the Microsoft Exchange Server Event Service, resides in a hidden message in the public folder where critiques are submitted. This script's code is triggered by events on the folder. For more information, see Using an Event Service Agent.

The following diagram shows this data flow. In this example, a critique has been approved and posted.

  1. Using Microsoft Outlook, an administrator approves a critique. (For design information on this process, see Approving or Rejecting a Critique.)
  2. The critique arrives in the LitCrit public folder, which triggers a Folder_OnMessageCreated folder event. Responding to the event, an agent of the Microsoft Exchange Server Event Service reads properties from the newly posted critique. It calls the UpdateRecord method of the server-side Critique COM component.
  3. Using ADO, the COM component writes the critique information to the Critique table in the FmLib database.