CManagedComponentWrapper 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public interface class CManagedComponentWrapper : Microsoft::SqlServer::Dts::Pipeline::Wrapper::Sql2012::IDTSDesigntimeComponent100
[System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.CManagedComponentWrapperClass))]
[System.Runtime.InteropServices.Guid("FF5DD3F1-99C1-4FFB-B097-1B1B2B9E9B2D")]
public interface CManagedComponentWrapper : Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.IDTSDesigntimeComponent100
[<System.Runtime.InteropServices.CoClass(typeof(Microsoft.SqlServer.Dts.Pipeline.Wrapper.Sql2012.CManagedComponentWrapperClass))>]
[<System.Runtime.InteropServices.Guid("FF5DD3F1-99C1-4FFB-B097-1B1B2B9E9B2D")>]
type CManagedComponentWrapper = interface
interface IDTSDesigntimeComponent100
Public Interface CManagedComponentWrapper
Implements IDTSDesigntimeComponent100
- 衍生
- 屬性
- 實作
範例
以下程式碼範例展示了如何利用元件的設計時實例來設定元件的自訂屬性。 在此範例中,元件元資料的 CustomPropertyCollection 可用來直接設定屬性,但會繞過元件監控及回應屬性變更的能力。
IDTSComponentMetaData100 cmp = dataflowTask.ComponentMetaDataCollection.New();
cmp.ComponentClassID = "DTSAdapter.OleDbSource";
CManagedComponentWrapper dtSource = cmp.Instantiate();
dtSource.SetComponentProperty("SqlCommand","select * from Production.Products");
Dim cmp As IDTSComponentMetaData100 = dataflowTask.ComponentMetaDataCollection.New
cmp.ComponentClassID = "DTSAdapter.OleDbSource"
Dim dtSource As CManagedComponentWrapper = cmp.Instantiate
dtSource.SetComponentProperty("SqlCommand", "select * from Production.Products")
備註
CManagedComponentWrapper 代表 IDTSDesigntimeComponent100 的介面,用於資料流程元件的設計時修改。 CManagedComponentWrapper 用於在設計時配置資料流程元件的屬性與欄位集合。 雖然元件的元資料可以直接被修改,但應避免,因為這會繞過元件驗證元資料修改的能力。 CManagedComponentWrapper 的實例是透過呼叫元件的 IDTSComponentMetaData100 介面的 Instantiate 方法來建立。