IDTSDesigntimeComponent100.ReinitializeMetaData Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
void ReinitializeMetaData();
[System.Runtime.InteropServices.DispId(12)]
public void ReinitializeMetaData ();
[<System.Runtime.InteropServices.DispId(12)>]
abstract member ReinitializeMetaData : unit -> unit
Public Sub ReinitializeMetaData ()
- Attributes
Examples
The following example calls ReinitializeMetaData in response to a component failing validation.
Dim p As Package = New Package
Dim dataFlow As MainPipe = CType(CType(p.Executables.Add("DTS.Pipeline"), TaskHost).InnerObject, MainPipe)
Dim md As IDTSComponentMetaData100 = dataFlow.ComponentMetaDataCollection.New
md.ComponentClassID = "DTSAdapter.OleDbSource"
Dim wrp As CManagedComponentWrapper = md.Instantiate
wrp.ProvideComponentProperties
If wrp.Validate = DTSValidationStatus.VS_NEEDSNEWMETADATA Then
wrp.ReinitializeMetaData
End If
Package p = new Package();
MainPipe dataFlow = ((TaskHost)p.Executables.Add("DTS.Pipeline")).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();
}
Remarks
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.