IDTSDesigntimeComponent100.ReinitializeMetaData 메서드
Fixes any errors identified during design-time validation that result in the component returning VS_NEEDSNEWMETADATA.
네임스페이스: Microsoft.SqlServer.Dts.Pipeline.Wrapper
어셈블리: Microsoft.SqlServer.DTSPipelineWrap(Microsoft.SqlServer.DTSPipelineWrap.dll)
구문
‘선언
Sub ReinitializeMetaData
‘사용 방법
Dim instance As IDTSDesigntimeComponent100
instance.ReinitializeMetaData()
void ReinitializeMetaData()
void ReinitializeMetaData()
abstract ReinitializeMetaData : unit -> unit
function ReinitializeMetaData()
주의
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("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();
}
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