IDTSRuntimeConnection100.ConnectionManager 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
런타임 연결 객체가 참조하는 객체를 IDTSConnectionManager100 받거나 설정합니다.
public:
property Microsoft::SqlServer::Dts::Runtime::Wrapper::IDTSConnectionManager100 ^ ConnectionManager { Microsoft::SqlServer::Dts::Runtime::Wrapper::IDTSConnectionManager100 ^ get(); void set(Microsoft::SqlServer::Dts::Runtime::Wrapper::IDTSConnectionManager100 ^ value); };
[System.Runtime.InteropServices.DispId(102)]
public Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager100 ConnectionManager { [System.Runtime.InteropServices.DispId(102)] get; [System.Runtime.InteropServices.DispId(102)] set; }
[<System.Runtime.InteropServices.DispId(102)>]
[<get: System.Runtime.InteropServices.DispId(102)>]
[<set: System.Runtime.InteropServices.DispId(102)>]
member this.ConnectionManager : Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager100 with get, set
Public Property ConnectionManager As IDTSConnectionManager100
속성 값
구성 요소의 일부 IDTSConnectionManager100 .
- 특성
예제
다음 코드 예시는 패키지를 프로그래밍적으로 로드할 때 이 속성이 어떻게 ConnectionManager 설정되는지 보여줍니다.
// TODO: Replace the path to the package with a valid path.
string package = @"c:\Package.dtsx";
// Create the application and load the package.
Application a = new Application();
Package p = a.LoadPackage( package , null );
// Walk the Executables collection looking for data flow tasks.
foreach (Executable e in p.Executables)
{
MainPipe mp = ((TaskHost)e).InnerObject as MainPipe;
if( e != null )
{
// Walk the components.
foreach( IDTSComponentMetaData100 md in mp.ComponentMetaDataCollection )
{
// Walk the RuntimeConnectionCollection.
foreach( IDTSRuntimeConnection100 rc in md.RuntimeConnectionCollection )
{
// Check to see if the package's connections collection contains the
// Connectionmanager stored in the RuntimeConnection.
if (p.Connections.Contains(rc.ConnectionManagerID))
rc.ConnectionManager = DtsConvert.ToConnectionManager100(p.Connections[rc.ConnectionManagerID]);
else
Console.WriteLine("The ConnectionManager " + rc.ConnectionManagerID + " was not found in the Package's Connections collection.");
}
}
}
}
' TODO: Replace the path to the package with a valid path.
Dim package As String = "c:\Package.dtsx"
' Create the application and load the package.
Dim a As Application = New Application
Dim p As Package = a.LoadPackage(package, Nothing)
' Walk the Executables collection looking for data flow tasks.
For Each e As Executable In p.Executables
Dim mp As MainPipe = CType(CType(e, TaskHost).InnerObject, MainPipe)
If Not (e Is Nothing) Then
' Walk the components.
For Each md As IDTSComponentMetaData100 In mp.ComponentMetaDataCollection
' Walk the RuntimeConnectionCollection.
For Each rc As IDTSRuntimeConnection100 In md.RuntimeConnectionCollection
' Check to see whether the package's connections collection
' contains the Connectionmanager stored in the RuntimeConnection.
If p.Connections.Contains(rc.ConnectionManagerID) Then
rc.ConnectionManager = DtsConvert.ToConnectionManager100(p.Connections(rc.ConnectionManagerID))
Else
Console.WriteLine("The ConnectionManager " + rc.ConnectionManagerID + " was not found in the Package's Connections collection.")
End If
Next
Next
End If
Next
설명
이 속성은 ConnectionManager 패키지 내 실제 객체 인스턴스 IDTSConnectionManager100 에 대한 참조를 포함하거나 설정합니다. 런타임에는 SSIS 런타임 엔진 ConnectionManagerID 이 이 참조를 자동으로 설정하여 패키지 내 연결을 찾고 참조를 할당합니다.
설계 시 SSIS 디자이너는 컴포넌트를 로드하고 초기화할 때 이 할당을 수행합니다. 하지만 디자이너 외부에서 객체 모델을 사용하여 컴포넌트를 프로그래밍적으로 로드하고 편집할 때는 속성이 명시적으로 설정되어야 합니다. 컴포넌트는 패키지 컬렉션이 ConnectionManagerID 컴포넌트에 노출되지 않기 때문에 이 속성을 명시적으로 Connections 참조할 수 없습니다.