次の方法で共有


DelayValidation プロパティ

実行時までタスクの検証が遅延されるかどうかを示す Boolean を取得します。値の設定も可能です。既定値は false です。

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

構文

'宣言
Public Property DelayValidation As Boolean
    Get
    Set
'使用
Dim instance As DtsContainer
Dim value As Boolean

value = instance.DelayValidation

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

プロパティ値

型: System. . :: . .Boolean
実行時までパッケージの検証が遅延される場合は true、パッケージが検証され、パッケージが実際に実行される前にエラーおよび警告が返される場合は false です。値が false のときは、MaximumErrorCount プロパティを超えるエラーまたは警告が発生すると、パッケージが実行されない場合があります。

説明

パッケージが実行される前にパッケージを検証するのは、実行が開始される前にエラーの一部を検出する方法の 1 つです。ただし、エラーを検出するためにパッケージを処理し、エラーが検出されないときは、パッケージが実行されます。この場合、パッケージが 2 回処理されるため、パッケージの検証によってパッケージの処理量が増加します。そのため、この処理は必要なときにだけ使用する必要があります。

使用例

Package クラスは、EventsProvider の継承によって DtsContainer を実装します。次のコード例では、パッケージを作成した後、DtsContainer から継承した値を表示および設定します。

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)
        {
            // The package is the ExecuteProcess package sample 
            // that is installed with the SSIS samples.
            string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";

            Application app = new Application();
            Package p1 = app.LoadPackage(pkg, null);

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

            Console.WriteLine();
        }
    }
}
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)
 
            Console.WriteLine()
        End Sub
    End Class
End Namespace

サンプルの出力 :

CreationName: SSIS.Package.2

DebugMode: False

DelayValidation: True

Description:

Disable: False

Description after modification: This is the Execute Process Package Sample