Export (0) Print
Expand All

Variable.DataType Property

Gets a TypeCode enumeration that describes the data type of the variable. This property is read-only.

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

function get DataType () : TypeCode

Property Value

Type: TypeCode
A TypeCode enumeration that represents the data type of the variable.

The DataType of a variable is not set explicitly, but is inferred from the initial value assigned to the variable, and cannot be changed afterward.

The following example creates a package, adds a ForEachLoop, and adds a variable to the Variables collection of the ForEachLoop. It then retrieves and sets properties on the variable and displays them for viewing, including the DataType.

No code example is currently available or this language may not be supported.

Sample Output:

The variable properties are:

Creation Name =

Description = my new v Description

ID = {622CF328-55D7-4E81-9385-9C1F8450511E}

Old name, new name = v, my_new_V_name

Old namespace, new namespace = global, my_new_v_Namespace

Properties count = 12

Qualified Name = my_new_v_Namespace::my_new_V_name

old RaiseEvent, new RaiseEvent = False, True

old read-only, new read-only = False, True

System Variable = False

Type = Int32

Community Additions

ADD
Show:
© 2014 Microsoft