Aracılığıyla paylaş


DtsEventHandler.GetPackagePath Yöntemi

Alır yol olay işleyicisi uygulayan paketi.

Ad Alanı:  Microsoft.SqlServer.Dts.Runtime
Derleme:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS içinde.dll)

Sözdizimi

'Bildirim
Public Function GetPackagePath As String
'Kullanım
Dim instance As DtsEventHandler
Dim returnValue As String

returnValue = instance.GetPackagePath()
public string GetPackagePath()
public:
virtual String^ GetPackagePath() sealed
abstract GetPackagePath : unit -> string 
override GetPackagePath : unit -> string 
public final function GetPackagePath() : String

Dönüş Değeri

Tür: System.String
A dize paketi içeren yol.

Uygulamalar

IDTSPackagePath.GetPackagePath()

Örnekler

Aşağıdaki kod örneği oluşturur bir DtsEventHandler paket, paket yol gösterir ve

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 pkg = new Package();
            DtsEventHandler dtsEH = (DtsEventHandler)pkg.EventHandlers.Add("OnError");
            dtsEH.Executables.Add("STOCK:SendMailTask");

            // View the package path for the DtsEventHandler container.
            Console.WriteLine("Package Path of DtsEventHandler: {0}", dtsEH.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 pkg As Package =  New Package() 
            Dim dtsEH As DtsEventHandler = CType(pkg.EventHandlers.Add("OnError"), DtsEventHandler)
            dtsEH.Executables.Add("STOCK:SendMailTask")

            ' View the package path for the DtsEventHandler container.
            Console.WriteLine("Package Path of DtsEventHandler: {0}", dtsEH.GetPackagePath())
        End Sub
    End Class
End Namespace

Örnek Çıktı:

DtsEventHandler paketin yolu: [\Package.EventHandlers[OnError]