Skip to main content
Windward

Using Data Source Connections in the Registry

Overview

This article covers how to use data source connections in the registry.

Note on Variable Data Source Names

You can now create a data source with a name of ${var_name} (use any var name). This will then save with the document just the name and will place this connection info in the registry. When opening the document, it will pull the connection info from the registry.

The Problem

An OEM creates standard templates for their customers. The data sources for these customers have the same schema but will reside on servers with different names. The customer will want the templates to come up and be connected not requiring the user to set the connection info for each data source when they first open the template.

The Solution

We store in the user's registry global data sources as name/value pairs where the name is the global name of the data source and the value is the connection string (including data source type). So the registry would have something like "employees=XML;name;c:\data\employees.xml".

We then store this connection string in the Word/Excel file as ${employees}. When opening the template, if the connection string is ${employees} then we pull it from the registry. And use the connection string in the registry.

When adding a data source to a template, we list all global connection strings in the top of the list of vendors and the user can select one.

When opening a template, if it has a ${name} that is not in the global list on that computer, the user would be prompted to enter the data source settings and that would then be saved to their registry. Companies can also create a .reg file to blast in all global data sources before using AutoTag.

Notes

This is for AutoTag only, it has no bearing on the engine. Therefore it can store these global data sources in the registry as it is always Windows.