IDTSComponentMetaData90.Instantiate Method

Creates an instance of a component specified by the ComponentClassID property.

命名空间: Microsoft.SqlServer.Dts.Pipeline.Wrapper
程序集: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)

语法

声明
<DispIdAttribute(104)> _
Function Instantiate As CManagedComponentWrapper
[DispIdAttribute(104)] 
CManagedComponentWrapper Instantiate ()
[DispIdAttribute(104)] 
CManagedComponentWrapper^ Instantiate ()
/** @attribute DispIdAttribute(104) */ 
CManagedComponentWrapper Instantiate ()
DispIdAttribute(104) 
function Instantiate () : CManagedComponentWrapper

返回值

The CManagedComponentWrapper class of the component.

备注

When this method is called, the design-time instance of the component defined by the ComponentClassID property is created. The design-time instance of the component is created to edit and configure the metadata of a component. The design-time instance should be used for editing a component, instead of directly accessing the component metadata, to allow the component to monitor and validate changes to the metadata.

示例

The following code sample shows how the design-time instance of a component is used to set the custom property of a component. In this example, the CustomPropertyCollection of the component metadata could be used to directly set the property, but would bypass the ability of the component to monitor and respond to changes to the property.

IDTSComponentMetaData90 cmp = dataflowTask.ComponentMetaDataCollection.New();
cmp.ComponentClassID = "DTSAdapter.OleDbSource";
CManagedComponentWrapper dtSource = cmp.Instantiate();
dtSource.SetComponentProperty("SqlCommand","select * from Production.Products");
Dim cmp As IDTSComponentMetaData90 = dataflowTask.ComponentMetaDataCollection.New 
cmp.ComponentClassID = "DTSAdapter.OleDbSource" 
Dim dtSource As CManagedComponentWrapper = cmp.Instantiate 
dtSource.SetComponentProperty("SqlCommand", "select * from Production.Products")

线程安全

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.

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

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