Moving Data to Outlook from SQL

Monday Jan 8th 2001 by Bruce Szabo

Having data in a database provides unique and simplified developmental opportunities. Follow along as author Bruce Szabo outlines the steps he took in a recent project, that of moving data from an SQL server into MS Outlook.

Calendar Information and SQL

An Overview

The nice thing about writing SQL server-related articles is that nearly any technology initiative can be tied back to databases. A variety of articles can be created covering numerous topics based on this type of enterprise database server.

A recent project offered an opportunity to access event information stored on SQL server and import it to Outlook. The two tables for the event information are shown below:

The EVENTS and USERS tables to be exported
Click image for full size

These tables are used to support events occurring at a trade show and contain three distinct types of events: attending educational sessions, visiting exhibitor booths, and scheduling personal events.

Educational sessions and personal events are treated as appointments since they have specific start and end times. However, trade show attendees tend to visit exhibitor booths in numeric order throughout the three-day event. Without a specific start and end time, visiting exhibitor booths is better treated as a task in Outlook.

The Goal

The intent is for users to create their own individual daily planner (including all three event types) via the Web. Without much control over the user's calendar package, the first version used the tables to organize the information to create printable planner pages. This application was well received by both external visitors as well as internal staff members. However, with internal staff being accustomed to using Outlook 2000 to manage calendar information and several having PDA's synched with Outlook, it made sense to develop a process to move the event information into Outlook.

The Solution

Given the Outlook object model and the events database, the project can be completed using