Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DtsContainer.TransactionOption Property

Gets or sets a DTSTransactionOption enumeration value that indicates whether the container participates in transactions.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
'Declaration
Public Property TransactionOption As DTSTransactionOption
	Get
	Set
'Usage
Dim instance As DtsContainer
Dim value As DTSTransactionOption

value = instance.TransactionOption

instance.TransactionOption = value

Property Value

Type: Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption
A DTSTransactionOption enumeration that indicates if this container can be part of transactions.

The following code example creates a Package, which is a class that inherits from DtsContainer. The Package shows the use of several inherited properties.

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)
            Dim app As Application =  New Application() 
            Dim pkg As Package =  New Package() 
 
            ' Package name must be assigned.
            pkg.Name = "My DtsContainer inheritance test package"
 
            ' Display the values that manually assigned.
            Console.WriteLine("Package Name: {0}", pkg.Name)
 
            ' Packages are assigned the following default values when created.
            Console.WriteLine("Package ID:           {0}", pkg.ID)
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure)
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure)
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID)
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID)
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel)
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode)
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount)
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption)
        End Sub
    End Class
End Namespace

Sample Output:

Package Name: My DtsContainer inheritance test package

Package ID: {2C2FAA96-35BA-4C5E-A39A-C5D7D30A0D79}

FailPackageOnFailure: False

FailParentOnFailure: False

Locale ID: 1033

Is DefaultLocaleID? False

Isolation Level: Serializable

LoggingMode: UseParentSetting

MaximumErrorCount: 1

TransactionOption: Supported

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.