IDTSDesigntimeComponent100.ReinitializeMetaData Method
Fixes any errors identified during design-time validation that result in the component returning VS_NEEDSNEWMETADATA.
Assembly: Microsoft.SqlServer.DTSPipelineWrap (in Microsoft.SqlServer.DTSPipelineWrap.dll)
The ReinitializeMetaData method is called in response to a component returning VS_NEEDSNEWMETADATA from Validate. During this method, components fix any errors that were identified in Validate, if those errors can be fixed by the component.
The following example calls ReinitializeMetaData in response to a component failing validation.
Package p = new Package(); MainPipe dataFlow = ((TaskHost)p.Executables.Add("SSIS.Pipeline.2")).InnerObject as MainPipe; IDTSComponentMetaData100 md = dataFlow.ComponentMetaDataCollection.New(); md.ComponentClassID = "DTSAdapter.OleDbSource"; CManagedComponentWrapper wrp = md.Instantiate(); wrp.ProvideComponentProperties(); if (wrp.Validate() == DTSValidationStatus.VS_NEEDSNEWMETADATA) { wrp.ReinitializeMetaData(); }