Bagikan melalui


DTSPackageType Enum

Definisi

Mengidentifikasi alat yang membuat paket.

public enum class DTSPackageType
public enum DTSPackageType
type DTSPackageType = 
Public Enum DTSPackageType
Warisan
DTSPackageType

Bidang

Default 0

Tidak ditentukan.

DTSDesigner 2

Menentukan bahwa paket dibuat dalam perancang di SQL Server 2000.

DTSDesigner100 5

Menentukan bahwa paket dibuat di SSIS Designer di SQL Server 2008 Integration Services (SSIS).

DTSWizard 1

Menentukan bahwa paket dibuat oleh Panduan Impor dan Ekspor SQL Server.

SQLDBMaint 6

Menentukan bahwa klien DBMaint membuat paket.

SQLReplication 3

Menentukan bahwa paket dibuat untuk mendukung langganan yang dapat diubah.

Contoh

Contoh kode berikut memuat salah satu sampel paket Layanan Integrasi, dan menampilkan jenis paketnya, yang merupakan salah satu nilai dari enumerasi ini.

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  

Contoh Output:

Jenis paketnya adalah: DTSDesigner100

Berlaku untuk