IDTSDesigntimeComponent100.ReinitializeMetaData 方法

定义

public:
 void ReinitializeMetaData();
[System.Runtime.InteropServices.DispId(12)]
public void ReinitializeMetaData ();
[<System.Runtime.InteropServices.DispId(12)>]
abstract member ReinitializeMetaData : unit -> unit
Public Sub ReinitializeMetaData ()
属性

示例

下面的示例调用 ReinitializeMetaData 来响应组件验证失败。

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();  
}  

注解

调用 ReinitializeMetaData 方法以响应从Validate返回VS_NEEDSNEWMETADATA的组件。 在此方法中,如果组件可以修复这些错误,则组件将修复在 验证过程中标识的任何错误。

适用于