Sequence.GetPackagePath 方法

定义

返回序列容器是其中一部分的包的路径。

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

返回

一个字符串,其中包含序列容器所属的包的路径。

实现

示例

下面的代码示例将序列容器添加到包,然后显示包路径。

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

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package package = new Package();  
            Sequence seq = (Sequence)package.Executables.Add("STOCK:SEQUENCE");  
            Console.WriteLine("Package path: {0}", seq.GetPackagePath());  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim package As Package =  New Package()   
            Dim seq As Sequence = CType(package.Executables.Add("STOCK:SEQUENCE"), Sequence)  
            Console.WriteLine("Package path: {0}", seq.GetPackagePath())  
        End Sub  
    End Class  
End Namespace  

示例输出:

包路径:\Package\{97669D5A-BF92-4C75-927D-EAD6CFFCE651}

适用于