Export (0) Print
Expand All

DtsContainer.Variables Property

Returns a collection that contains the variables associated with this container. This property is read-only.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

public Variables Variables { get; }

Property Value

Type: Microsoft.SqlServer.Dts.Runtime.Variables
A Variables collection.

The following example creates a package, and adds a variable, myVar, to the variable collection. The Package has use of the Variables collection through its inheritance of DtsContainer.

static void Main(string[] args)
        {
            Package p = new Package();
            //Add a variable, ,myvar, to the package variables
            // collection with a value of 5, in the myNamespace
            // namespace
            Variable var = p.Variables.Add("myVar", false, "myNamespace", 5);
            //
            // rest of code here...
            //
        }
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft