CManagedComponentWrapperClass.SetUsageType メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
public:
virtual Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2012::IDTSInputColumn100 ^ SetUsageType(int lInputID, Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2012::IDTSVirtualInput100 ^ pIDTSVirtualInputObject, int lLineageID, Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2012::DTSUsageType eUsageType) = Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2012::IDTSDesigntimeComponent100::SetUsageType;
[System.Runtime.InteropServices.DispId(16)]
public virtual Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSInputColumn100 SetUsageType(int lInputID, Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSVirtualInput100 pIDTSVirtualInputObject, int lLineageID, Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.DTSUsageType eUsageType);
[<System.Runtime.InteropServices.DispId(16)>]
abstract member SetUsageType : int * Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSVirtualInput100 * int * Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.DTSUsageType -> Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSInputColumn100
override this.SetUsageType : int * Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSVirtualInput100 * int * Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.DTSUsageType -> Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSInputColumn100
Public Overridable Function SetUsageType (lInputID As Integer, pIDTSVirtualInputObject As IDTSVirtualInput100, lLineageID As Integer, eUsageType As DTSUsageType) As IDTSInputColumn100
パラメーター
- lInputID
- Int32
- pIDTSVirtualInputObject
- IDTSVirtualInput100
- lLineageID
- Int32
- eUsageType
- DTSUsageType
返品
IDTSInputColumn100の利用タイプが設定されているか、またはその列がコレクションから削除された場合はその使用型が null されます。
実装
- 属性
例
以下のコード例は、SetUsageTypeが上流コンポーネントからそのコンポーネントが使用する列を選択するためにどのように使われるかを示しています。 この例は、パッケージがすでに作成または読み込まれており、データフロータスクとコンポーネントがパッケージに追加されていることを前提としています。
IDTSComponentMetaData100 md = dataFlow.ComponentMetaDataCollection[1];
CManagedComponentWrapper wrp = md.Instantiate();
IDTSInput100 input = md.InputCollection[0];
IDTSVirtualInput100 vInput = input.GetVirtualInput();
foreach(IDTSVirtualInputColumn100 vCol in vInput.VirtualInputColumnCollection)
{
wrp.SetUsageType(input.ID,vInput,vCol.LineageID,DTSUsageType.UT_READWRITE);
}
注釈
この方法は、データフローグラフの上流コンポーネントからコンポーネントが使用する列を選択するために使用されます。 このメソッドを呼び出して、コンポーネントのInputColumnCollectionからIDTSInputColumn100を追加または削除します。 また、コンポーネントがカラムに対して読み取り専用アクセス権を持つか、実行中にカラムの値を上書きできるかも指定します。
eusageTypeがUT_READONLYまたはUT_READWRITEの場合、コンポーネントはその列を入力列コレクションに追加し、実行中にデータフローエンジンにその列を提供します。 UT_IGNOREDが指定されていて、かつその列が以前にコレクションに追加されている場合、その列は削除されます。