IDTSInput90.GetVirtualInput Method

Gets the IDTSVirtualInput90 object of an IDTSInput90 object.

Namespace: Microsoft.SqlServer.Dts.Pipeline.Wrapper
Assembly: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)

Syntax

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

Return Value

The IDTSVirtualInput90 object of the IDTSInput90.

Remarks

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.

Example

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

Thread Safety

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.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

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