다음을 통해 공유


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