IDTSPackagePath.GetPackagePath 메서드

정의

패키지 위치에 대한 상대 경로를 포함하는 String을 반환합니다.

public:
 System::String ^ GetPackagePath();
public string GetPackagePath ();
abstract member GetPackagePath : unit -> string
Public Function GetPackagePath () As String

반환

패키지 위치에 대한 상대 경로를 포함하는 문자열입니다.

예제

클래스는 ConnectionManager 이 인터페이스에서 상속됩니다. 다음 코드 예제에서는 메서드를 ConnectionManager 사용하는 방법을 GetPackagePath 보여줍니다.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Connections_Collection  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
           // The package is one of the SSIS Samples.  
            string mySample = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx";  

            // Create an application and load the sample.  
            Application app = new Application();  
            Package pkg = app.LoadPackage(mySample, null);  
            Connections myConns = pkg.Connections;  

            // Get the package path.  
            foreach (ConnectionManager connMgr in myConns)  
            {  
                Console.WriteLine("PackagePath:        {0}", connMgr.GetPackagePath());  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Connections_Collection  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
           ' The package is one of the SSIS Samples.  
            Dim mySample As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx"   

            ' Create an application and load the sample.  
            Dim app As Application =  New Application()   
            Dim pkg As Package =  app.LoadPackage(mySample,Nothing)   
            Dim myConns As Connections =  pkg.Connections   

            ' Get the package path.  
            Dim connMgr As ConnectionManager  
            For Each connMgr In myConns  
                Console.WriteLine("PackagePath:        {0}", connMgr.GetPackagePath())  
            Next  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

PackagePath: \Package.Connections[{3427BFE1-F10C-4B7E-8E70-E8D9DC7DDDBA3}]

PackagePath: \Package.Connections[{48B66F8D-7DFE-4D85-91C7-0999655484B2}]

설명

이 인터페이스는 컨테이너에서 상속됩니다. Integration Services 아키텍처에서 컨테이너는 작업에 구조 및 서비스를 제공합니다. 패키지는 컨테이너의 유형입니다. SSIS에 포함된 다른 컨테이너 유형은 For 루프, Foreach 루프, 시퀀스, 태스크 호스트 컨테이너 및 이벤트 처리기입니다. 자세한 내용은 Integration Services(SSIS) 패키지를 참조하세요.

적용 대상