Export (0) Print
Expand All

Package.PackageType Property

Sets or returns a value that identifies the tool that created the package.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

public DTSPackageType PackageType { get; set; }

Property Value

Type: Microsoft.SqlServer.Dts.Runtime.DTSPackageType
A value from the DTSPackageType enumeration.

If the package is created using SSIS Designer, the default value is DTSDesigner100.

The following code example shows the package type for one of the SSIS sample packages.

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

namespace Package_API
{
    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\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx", null);

            // Show the package type
            Console.WriteLine("The package type is {0}", pkg.PackageType);
        }
    }
}

Sample Output:

The package type is Default

Community Additions

ADD
Show:
© 2014 Microsoft