Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

DTSTransactionOption Enumeration

Describes transaction supportability and specifies whether a container participates in transactions.

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

public enum DTSTransactionOption
public enum DTSTransactionOption
public enum DTSTransactionOption

Member nameDescription
NotSupportedSpecifies that no transaction will be started for this container, and consequently, the outcome of the current transaction, if one has been started by a parent container, will not affect the data that may be altered during execution of this container. This means that changes will not roll back, even if the parent container started a transaction.
RequiredSpecifies that this container will cause a new transaction to be started unless the parent container already has a transaction, in which case, the parent’s transaction will be joined.
SupportedSpecifies that this container will not start a transaction. However, it will participate in a transaction if the parent container started one. This is the default.

This enumeration is used by containers to indicate whether the container participates in transactions.


The following code example shows the use of this enumeration to change the value of the Package.TransactionOption.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;

namespace Microsoft.SqlServer.SSIS.Samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Application app = new Application();
            Package pkg = new Package();

            // Display the default value of TransactionOption.
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption);

            // Modify the value.
            pkg.TransactionOption = DTSTransactionOption.Required;

            // Display the new value of TransactionOption.
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption);
        }
    }
}

Sample Output:

TransactionOption: Supported

TransactionOption: Required

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

ADD
Show:
© 2015 Microsoft