CManagedComponentWrapperClass.SetUsageType Method

Creates an IDTSInputColumn90 object in the IDTSInputColumnCollection90 of the component and sets the UsageType property of the column.

네임스페이스: Microsoft.SqlServer.Dts.Pipeline.Wrapper
어셈블리: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)

구문

‘선언
<DispIdAttribute(16)> _
Public Overridable Function SetUsageType ( _
    <InAttribute> lInputID As Integer, _
    <InAttribute> pIDTSVirtualInputObject As IDTSVirtualInput90, _
    <InAttribute> lLineageID As Integer, _
    <InAttribute> eUsageType As DTSUsageType _
) As IDTSInputColumn90 Implements IDTSDesigntimeComponent90.SetUsageType
[DispIdAttribute(16)] 
public virtual IDTSInputColumn90 IDTSDesigntimeComponent90.SetUsageType (
    [InAttribute] int lInputID,
    [InAttribute] IDTSVirtualInput90 pIDTSVirtualInputObject,
    [InAttribute] int lLineageID,
    [InAttribute] DTSUsageType eUsageType
)
[DispIdAttribute(16)] 
public:
virtual IDTSInputColumn90^ SetUsageType (
    [InAttribute] int lInputID, 
    [InAttribute] IDTSVirtualInput90^ pIDTSVirtualInputObject, 
    [InAttribute] int lLineageID, 
    [InAttribute] DTSUsageType eUsageType
) = IDTSDesigntimeComponent90::SetUsageType
J#은 명시적 인터페이스 구현의 사용을 지원하지만 새로 선언하는 것은 지원하지 않습니다.
JScript는 명시적 인터페이스 구현의 사용을 지원하지만 새로 선언하는 것은 지원하지 않습니다.

매개 변수

  • eUsageType
    The usage type of the input column.

반환 값

The IDTSInputColumn90 whose usage type is set, or null if the column was removed from the collection.

주의

This method is used to select the columns from the upstream component in the data flow graph that are used by the component. Call this method to add or remove an IDTSInputColumn90 from the InputColumnCollection of the component. It also specifies whether the component has read-only access to the column or if it can overwrite the values of the column during execution.

If eusageType is UT_READONLY or UT_READWRITE, the component adds the column to its input column collection and provides the column to the data flow engine during execution. If UT_IGNORED is specified, and the column has previously been added to the collection, the column is removed.

The following code example shows how SetUsageType is used to select the columns from the upstream component that are used by the component. The example assumes that the package has already been created or loaded, and that the data flow task and components have been added to the package.

IDTSComponentMetaData90 md = dataFlow.ComponentMetaDataCollection[1];
CManagedComponentWrapper wrp = md.Instantiate();
IDTSInput90 input = md.InputCollection[0];
IDTSVirtualInput90 vInput = input.GetVirtualInput();

foreach(IDTSVirtualInputColumn90 vCol in vInput.VirtualInputColumnCollection)
{
    wrp.SetUsageType(input.ID,vInput,vCol.LineageID,DTSUsageType.UT_READWRITE);
}

스레드 보안

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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

CManagedComponentWrapperClass Class
CManagedComponentWrapperClass Members
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace