共用方式為


DTSPackageType Enumeration

Identifies the tool that created the package.

命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

語法

'宣告
Public Enumeration DTSPackageType
public enum DTSPackageType
public enum class DTSPackageType
public enum DTSPackageType
public enum DTSPackageType

Members

Member name Description
Default Undefined.
DTSDesigner Specifies that the package was created in the designer in SQL Server 2000.
DTSDesigner90 Specifies that the package was created in the SSIS Designer in SQL Server 2005 Integration Services (SSIS).
DTSWizard Specifies that the package was created by the SQL Server Import and Export Wizard.
SQLDBMaint Specifies that the DBMaint client created the package.
SQLReplication Specifies that the package was generated to support transformable subscriptions.

範例

The following code example loads one of the Integration Services package samples, and displays its package type, which is one of the values from this enumeration.

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\90\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\90\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

Sample Output:

The package type is: DTSDesigner90

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

Microsoft.SqlServer.Dts.Runtime Namespace