Udostępnij za pośrednictwem


Wyliczenie DTSPackageType

Identyfikuje narzędzie, która utworzyła pakiet.

Przestrzeń nazw:  Microsoft.SqlServer.Dts.Runtime
Zestaw:  Microsoft.SqlServer.ManagedDTS (w Microsoft.SqlServer.ManagedDTS.dll)

Składnia

'Deklaracja
Public Enumeration DTSPackageType
'Użycie
Dim instance As DTSPackageType
public enum DTSPackageType
public enum class DTSPackageType
type DTSPackageType
public enum DTSPackageType

Elementy członkowskie

Nazwa elementu członkowskiego Opis
Default Niezdefiniowana.
DTSWizard Określa, że pakiet został utworzony przez program SQL Server Kreatora importu i eksportu.
DTSDesigner Określa, że pakiet został utworzony w projektancie w SQL Server 2000.
SQLReplication Określa, że pakiet został wygenerowany do obsługi umożliwiającego przejście subskrypcji.
DTSDesigner100 Określa, że pakiet został utworzony w SSIS projektanta w SQL Server 2008 Integration Services (SSIS).
SQLDBMaint Określa, że klient DBMaint utworzony pakiet.

Przykłady

Następujący przykładowy kod ładuje jednej próbki pakiet usług integracji i wyświetla jego typ pakietu jest jedną z wartości z tego wyliczenia.

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)
        {
            Application app = new Application();
            Package pkg= new Package();
            pkg = app.LoadPackage(@"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\SmoTablesDBCC\SmoTablesDBCC\SmoTablesDBCC.dtsx", null);
            
            // Display the package type.
            Console.WriteLine("The package type is: {0}", pkg.PackageType);
        }
    }
}
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 app As Application =  New Application() 
            Dim pkg As Package =  New Package() 
            pkg = app.LoadPackage("C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\SmoTablesDBCC\SmoTablesDBCC\SmoTablesDBCC.dtsx", Nothing)
 
            ' Display the package type.
            Console.WriteLine("The package type is: {0}", pkg.PackageType)
        End Sub
    End Class
End Namespace

Przykładowe dane wyjściowe:

Typ pakiet jest: DTSDesigner100