다음을 통해 공유


DtsContainer.FailParentOnFailure 속성

Gets or sets a Boolean that defines whether the parent container fails when a child container fails.

네임스페이스:  Microsoft.SqlServer.Dts.Runtime
어셈블리:  Microsoft.SqlServer.ManagedDTS(Microsoft.SqlServer.ManagedDTS.dll)

구문

‘선언
Public Property FailParentOnFailure As Boolean 
    Get 
    Set
‘사용 방법
Dim instance As DtsContainer 
Dim value As Boolean 

value = instance.FailParentOnFailure

instance.FailParentOnFailure = value
public bool FailParentOnFailure { get; set; }
public:
property bool FailParentOnFailure {
    bool get ();
    void set (bool value);
}
member FailParentOnFailure : bool with get, set
function get FailParentOnFailure () : boolean 
function set FailParentOnFailure (value : boolean)

속성 값

유형: System.Boolean
A Boolean that indicates whether the package fails if an error occurs in a child container. The default value of this property is false.

주의

If FailParentOnFailure is true and the execution result of a container is failure, the execution result of failure is assigned to the parent container. For more information, see 검사점을 사용하여 패키지 다시 시작.

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

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

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

참고 항목

참조

DtsContainer 클래스

Microsoft.SqlServer.Dts.Runtime 네임스페이스