Using Variables in a Synonym

How to:

The synonym editor allows you to define variables in a synonym in order to specify synonym attributes, such as the connection name or the table name. For an example of how variables in a synonym can be used, see Iterating Through Multiple Tables.


Top of page

x
Procedure: How to Add a Variable to a Synonym
  1. Right-click an object in the synonym editor, select Insert and click Variable, as shown in the following image.

    Add variable

  2. A new folder named Variables is added to the object tree, with &&VARIABLE1 as an entry. The Properties Page shows the attributes of the variable, as shown in the image below.

    The Properties page shows the variable attributes

  3. If desired, change the name of the variable and enter a default value in the appropriate fields.

Top of page

x
Procedure: How to Add a Variable for an Attribute

Attributes in a synonym that can be specified with a variable are identified with an attribute name in blue, as shown in the following image.

Attributes

To add variables for an attribute:

  1. Right-click the attribute and select Parameterize Value.
  2. Expand the variables folder. A variable with a name that combines the synonym name with the variable name has been added.
  3. Click the variable name to assign values, as seen in the following image.


iWay Software