2014-02-18 5 views
1

사용자 지정 SSIS 변환 데이터 흐름 구성 요소를 작성하고 사용자 지정 속성을 관리하는 사용자 지정 UI를 작성했습니다. 내 구성 요소에는 ProvideComponentProperties 메서드를 재정 의하여 만든 추가 ADO.net 연결이 있습니다.C# 사용자 지정 UI를 통한 SSIS 사용자 지정 데이터 흐름 구성 요소의 사용자 지정 연결 설정

//New connection manager 
      IDTSRuntimeConnection100 conn = this.ComponentMetaData.RuntimeConnectionCollection.New(); 
      conn.Name = "Central Store Connection"; 
      conn.Description = "ADO.NET Connection to the central Data Store"; 

이렇게하면 고급 편집기에서 연결 탭을 사용하여 설정할 수 있습니다. 내 UI에서 나는 패키지의 모든 ADO.net 연결에 결합하는 콤보가 : 여기

연결 내 UI의 초기화 방법에 Microsoft.SqlServer.Dts.Runtime.Connections 연결에서 통과

/// <summary> 
     /// Initialises the connections combobox only adding ADO.Net connections 
     /// </summary> 
     private void initialiseConnections() 
     { 
      if (connections != null) 
      { 
       for (int i = 0; i < connections.Count; i++) 
       { 
        if (connections[i].CreationName.ToLower().Contains("ado.net")) 
        { 
         comboConnections.Items.Add(connections[i]); 
        } 
       } 
      }    
     } 
수업.

콤보 상자 선택이 변경되었을 때 RuntimeConnectionCollection을 설정할 수 있기를 원합니다.

사용자 설정 메타 데이터 속성처럼 설정하려고 시도했지만 작동하지 않습니다.

답변

0

RuntimeConnectionCollection에서 ConnectionManagerID를 사용해야합니다.

ConnectionManagerID 속성을 사용하면 모든 것이 정상적으로 작동합니다.

관련 문제