AddGlobalVariable Method

DTS Programming

DTS Programming

AddGlobalVariable Method

The AddGlobalVariable method adds a GlobalVariable object to the collection by name.

Applies To
GlobalVariables Collection
Syntax

GlobalVariables.AddGlobalVariable Name, Value

Part Description
GlobalVariables Expression that evaluates to a GlobalVariables collection
Name String that is the name of the global variable
Value Variant that is the initial value of the global variable

Remarks

The AddGlobalVariable method does not return a reference to the GlobalVariable object it creates. You also can create the GlobalVariable object with the New method and then add it to the collection with the Add method.

Prototype (C/C++)

HRESULT AddGlobalVariable(
    BSTR Name,
    VARIANT Value);

See Also

Add Method

Adding DTS Lookups and Global Variables

GlobalVariable Object

New (Name) Method