IDTSInput90.GetVirtualInput Method

Gets the IDTSVirtualInput90 object of an IDTSInput90 object.

命名空間: Microsoft.SqlServer.Dts.Pipeline.Wrapper
組件: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)

語法

'宣告
<DispIdAttribute(105)> _
Function GetVirtualInput As IDTSVirtualInput90
[DispIdAttribute(105)] 
IDTSVirtualInput90 GetVirtualInput ()
[DispIdAttribute(105)] 
IDTSVirtualInput90^ GetVirtualInput ()
/** @attribute DispIdAttribute(105) */ 
IDTSVirtualInput90 GetVirtualInput ()
DispIdAttribute(105) 
function GetVirtualInput () : IDTSVirtualInput90

傳回值

The IDTSVirtualInput90 object of the IDTSInput90.

備註

The GetVirtualInput method retrieves an IDTSVirtualInput90 object, which contains the collection of columns exposed in the IDTSOutput90 of the component connected to the IDTSInput90 through the IDTSPath90 object.

The IDTSVirtualInput90 object is not a persisted collection, and is simply a view of the IDTSOutput90 of the upstream component. Therefore, modifications to the IDTSVirtualInput90 or the columns contained in its VirtualInputColumnCollection are possible but do not have any impact on the IDTSOutput90 and its columns and thus should be avoided.

Columns from the VirtualInputColumnCollection are added and removed from the InputColumnCollection of the IDTSInput90 object by calling the SetUsageType method of the IDTSVirtualInput90 object.

If the IDTSInput90 object is not attached to an upstream component (its IsAttached property is false), the VirtualInputColumnCollection of the IDTSVirtualInput90 will be empty.

範例

The following code example calls SetUsageType on each column in a virtual input.

private void MapAllColumns( IDTSInput90 input )
{
    IDTSVirtualInput90 vInput = input.GetVirtualInput();

    foreach( IDTSVirtualInputColumn90 vCol in vInput.VirtualInputColumnCollection )
    {
        vInput.SetUsageType( vCol.LineageID, DTSUsageType.UT_READWRITE);
    }
}
Private Sub MapAllColumns(ByVal input As IDTSInput90) 
 Dim vInput As IDTSVirtualInput90 = input.GetVirtualInput 
 For Each vCol As IDTSVirtualInputColumn90 In vInput.VirtualInputColumnCollection 
   vInput.SetUsageType(vCol.LineageID, DTSUsageType.UT_READWRITE) 
 Next 
End Sub

執行緒安全性

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 的硬體和軟體需求>。

請參閱

參考

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