Compartir a través de


IDTSDesigntimeComponent90.ReinitializeMetaData Method

Fixes any errors identified during design-time validation that result in the component returning VS_NEEDSNEWMETADATA.

Espacio de nombres: Microsoft.SqlServer.Dts.Pipeline.Wrapper
Ensamblado: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)

Sintaxis

'Declaración
<DispIdAttribute(12)> _
Sub ReinitializeMetaData
[DispIdAttribute(12)] 
void ReinitializeMetaData ()
[DispIdAttribute(12)] 
void ReinitializeMetaData ()
/** @attribute DispIdAttribute(12) */ 
void ReinitializeMetaData ()
DispIdAttribute(12) 
function ReinitializeMetaData ()

Notas

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.

Ejemplo

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;

IDTSComponentMetaData90 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 IDTSComponentMetaData90 = 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

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

IDTSDesigntimeComponent90 Interface
IDTSDesigntimeComponent90 Members
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace