Export (0) Print
Expand All

Task.Version Property

*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.

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

Public Overridable ReadOnly Property Version As Integer 
Dim instance As Task 
Dim value As Integer 

value = instance.Version

Property Value

Type: Int32
An Integer that contains the task version number.


This member will be removed in a future version of Microsoft SQL Server. Avoid using this member in new development work, and plan to modify applications that currently use this member.

The following code example creates the Send Mail task, which inherits from Task, and then displays the properties is has inherited.

Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.SendMailTask
Namespace Microsoft.SqlServer.SSIS.Samples
    Class Program
        Shared  Sub Main(ByVal args() As String)
            Dim app As Application =  New Application() 
            Dim pkg As Package =  New Package() 
            ' Add a Send Mail task to the package.
            Dim exec As Executable =  pkg.Executables.Add("STOCK:SendMailTask") 
            ' Cast the task to its own class.
            Dim th As TaskHost =  exec as TaskHost 
            Dim smTask As SendMailTask =  th.InnerObject as SendMailTask 
            ' Display the properties inherited from Task.
            Console.WriteLine("ExecutionValue: {0}", smTask.ExecutionValue)
            Console.WriteLine("Version: {0}", smTask.Version)
            Console.WriteLine("WaitForMe: {0}", smTask.WaitForMe)
        End Sub
    End Class
End Namespace

Sample Output:


Version: 0

WaitForMe: True

Community Additions

© 2014 Microsoft