AliasTable (Property)

Applies To:

QueryOptions object

Description:

Sets and reads the name of the current alias table when the UseAliasTable (Property) is enabled.

An exception is thrown if this property is modified when the query is disconnected. An exception is thrown if this property is modified when the UseAliasTable (Property) is set to false.

Action:

Read-write, String

Example 1:

This example sets the alias table if the UseAliasTable is enabled:

var opts = Sections["Query"].QueryOptions;
var aliasTable = "";
if (opts.UseAliasTable == true)
    aliasTable = opts.AliasTable;
else {

Example 2:

This example shows how to read and set an alias table:

var opts = Sections["Query"].QueryOptions;
var aliasTable = "";
if (opts.UseAliasTable == true)
    aliasTable = opts.AliasTable;
else {
    opts.AliasTable = "Long Names";
    opts.UseAliasTable = true;
}