DTSPackageInfoFlags Enumeration
SQL Server 2012
Describes whether a package is a folder or package. It is used for setting a valid value in the Flags property.
Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
The following code example loads a sample package and displays some package properties, including the Flags property, which returns a value from this enumeration.
using System; using System.Collections.Generic; using System.Text; using Microsoft.SqlServer.Dts.Runtime; namespace PackageInfoTest { class Program { static void Main(string[] args) { // The pkg variable points to a package // installed with the SSIS samples. string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx"; Application app = new Application(); Package p1 = app.LoadPackage(pkg, null); p1.Description = "CalculatedColumns package"; app.SaveToDtsServer(p1, null, @"File System\myp1Package", "YOURSERVER"); PackageInfos pInfos = app.GetDtsServerPackageInfos(@"File System", "YOURSERVER"); foreach (PackageInfo pinfo in pInfos) { Console.WriteLine("Package Information"); Console.WriteLine("CreationDate: {0}", pinfo.CreationDate); Console.WriteLine("Flags: {0}", pinfo.Flags); Console.WriteLine("Folder: {0}", pinfo.Folder); Console.WriteLine("Name: {0}", pinfo.Name); } } } }
Sample Output:
Package Information
CreationDate: 3/24/2008 5:21:51 PM
Flags: Package
Folder: File System
Name: myp1Package