Sdílet prostřednictvím


IDTSDesigntimeComponent100.Validate Method

Verifies that the component is correctly configured.

Namespace:  Microsoft.SqlServer.Dts.Pipeline.Wrapper
Assembly:  Microsoft.SqlServer.DTSPipelineWrap (in Microsoft.SqlServer.DTSPipelineWrap.dll)

Syntax

'Declaration
Function Validate As DTSValidationStatus
'Usage
Dim instance As IDTSDesigntimeComponent100
Dim returnValue As DTSValidationStatus

returnValue = instance.Validate()
DTSValidationStatus Validate()
DTSValidationStatus Validate()
abstract Validate : unit -> DTSValidationStatus 
function Validate() : DTSValidationStatus

Return Value

Type: Microsoft.SqlServer.Dts.Pipeline.Wrapper.DTSValidationStatus
A value from the DTSValidationStatus enumeration that indicates the status of the component.

Remarks

The Validate method is implemented by component developers to verify that the component is correctly configured. It is called repeatedly during package design, and one time before execution of the component. Components should not modify its IDTSComponentMetaData100 during Validate.

Each component has different requirements for successful validation, but the following list provides some of the common items that should be validated.

Components should provide feedback to users when validation fails. Feedback is provided through the FireError and FireWarning methods and by the DTSValidationStatus return value. Calls to the FireError and FireWarning methods are displayed in the Task List window in Business Intelligence Development Studio, and should provide users guidance on the validation failure. Of the four values in the DTSValidationStatus enumeration, only VS_ISVALID indicates successful validation. The other three values indicate different levels of failure. The following table describes the failure values in the enumeration and how they are interpreted by SSIS Designer.

Status

Description

VS_ISBROKEN

Indicates that the component is not configured correctly. The user must make changes to the ComponentMetaData to resolve the problems.

VS_NEEDSNEWMETADATA

Indicates that the validation errors can be fixed by the component in its implementation of the ReinitializeMetaData method. The SSIS designer will prompt users that the component can repair itself when the enumeration value is VS_NEEDSNEWMETADATA. Then the designer will call the ReinitializeMetaData method.

VS_ISCORRUPT

Indicates that the ComponentMetaData is corrupted and cannot be repaired by a call to the ReinitializeMetaData method or by edits to the component.

When the DelayValidation property of the data flow task is true, design-time calls to the Validate method are eliminated, and the method is called before component execution instead.