次の方法で共有


DtsContainer.TransactionOption Property

コンテナがトランザクションに参加するかどうかを示す DTSTransactionOption 列挙値を取得します。値の設定も可能です。

名前空間: Microsoft.SqlServer.Dts.Runtime
アセンブリ: Microsoft.SqlServer.ManagedDTS (microsoft.sqlserver.manageddts.dll 内)

構文

'宣言
Public Property TransactionOption As DTSTransactionOption
public DTSTransactionOption TransactionOption { get; set; }
public:
property DTSTransactionOption TransactionOption {
    DTSTransactionOption get ();
    void set (DTSTransactionOption value);
}
/** @property */
public DTSTransactionOption get_TransactionOption ()

/** @property */
public void set_TransactionOption (DTSTransactionOption value)
public function get TransactionOption () : DTSTransactionOption

public function set TransactionOption (value : DTSTransactionOption)

プロパティ値

このコンテナをトランザクションの一部にすることができるかどうかを示す DTSTransactionOption 列挙です。

使用例

次のコード例では、DtsContainer から継承される Package クラスを作成します。Package は、複数の継承されたプロパティが使用されていることを示します。

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();

            // 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);
        }
    }
}
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

サンプルの出力 :

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

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

DtsContainer Class
DtsContainer Members
Microsoft.SqlServer.Dts.Runtime Namespace