DtsContainer.Disable Property

A Boolean that indicates if the DtsContainer object is disabled.

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

Public Property Disable As Boolean
Dim instance As DtsContainer
Dim value As Boolean

value = instance.Disable

instance.Disable = value

Property Value

Type: System.Boolean
A Boolean that indicates if the object is disabled. If true, the DtsContainer is disabled and the object will not execute.

The default value is false.

The Package class implements the DtsContainer through its inheritance of the EventsProvider. The following code example creates a package, then displays and sets values inherited from DtsContainer.

Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace Microsoft.SqlServer.SSIS.Samples
    Class Program
        Shared  Sub Main(ByVal args() As String)
            ' The package is the ExecuteProcess package sample 
            ' that is installed with the SSIS samples.
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx" 
            Dim app As Application =  New Application() 
            Dim p1 As Package =  app.LoadPackage(pkg,Nothing) 
            ' Show the properties inherited from DtsContainer.
            Console.WriteLine("CreationName:    {0}", p1.CreationName)
            Console.WriteLine("DebugMode:       {0}", p1.DebugMode)
            Console.WriteLine("DelayValidation: {0}", p1.DelayValidation)
            Console.WriteLine("Description:     {0}", p1.Description)
            Console.WriteLine("Disable:         {0}", p1.Disable)
            ' Description is not set for this sample, so set it.
            p1.Description = "This is the Execute Process Package Sample"
            Console.WriteLine("Description after modification: {0}", p1.Description)
        End Sub
    End Class
End Namespace

Sample Output:

CreationName: SSIS.Package.2

DebugMode: False

DelayValidation: True


Disable: False

Description after modification: This is the Execute Process Package Sample

Community Additions