DtsContainer.DelayValidation 属性

定义

获取或设置一个布尔值,该值指示验证任务是否延迟到运行时。 默认值为 false。

public:
 property bool DelayValidation { bool get(); void set(bool value); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategoryExecution")]
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "DelayValidationDesc")]
public bool DelayValidation { get; set; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategoryExecution")>]
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "DelayValidationDesc")>]
member this.DelayValidation : bool with get, set
Public Property DelayValidation As Boolean

属性值

如果包的验证延迟到运行时,则为 true。 如果验证包,并在实际执行包之前返回错误和警告,则为 false。 如果为 false,则当发生超过 MaximumErrorCount 属性的错误或警告时,将阻止包运行。

属性

示例

Package实现DtsContainer其继承 。EventsProvider 下面的代码示例创建包,然后显示并设置继承自 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:MSDTS。Package.1

DebugMode: False

DelayValidation: True

说明:

禁用:False

修改后的说明:这是执行进程包示例

注解

在运行包之前验证包是在执行开始之前查找某些错误的方法。 但是,它会处理包以查找错误,如果未找到任何错误,包将运行。 由于这两次通过包,因此验证包会增加包的处理量,因此仅在必要时才应使用。

适用于