Export (0) Print
Expand All

DtsContainer.DelayValidation Property

Gets or sets a Boolean that indicates whether validation of the task is delayed until run time. The default value is false.

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

public bool DelayValidation { get; set; }

Property Value

Type: System.Boolean
true if validation of the package is delayed until run time. false if the package is validated, and errors and warnings are returned before the package is actually executed. false may prevent the package from running if errors or warnings occur that exceed the MaximumErrorCount property.

Validating the package before it runs is a way of finding some errors before execution starts. However, it processes the package to find errors, and if no errors are found, the package runs. Because this goes through the package two times, validating a package increases the amount of processing for the package, so should be used only when necessary.

The Package class implements the DtsContainer through its inheritance of the EventsProvider. The following code example creates a package, then displays and sets values inherited from 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();
        }
    }
}

Sample Output:

CreationName: SSIS.Package.2

DebugMode: False

DelayValidation: True

Description:

Disable: False

Description after modification: This is the Execute Process Package Sample

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft