다음을 통해 공유


DTSPackageInfoFlags 열거형

정의

패키지가 폴더인지 패키지인지 설명합니다. Flags 속성에서 올바른 값을 설정하는 데 사용됩니다.

public enum class DTSPackageInfoFlags
public enum DTSPackageInfoFlags
type DTSPackageInfoFlags = 
Public Enum DTSPackageInfoFlags
상속
DTSPackageInfoFlags

필드

Folder 0

폴더입니다.

Package 1

패키지입니다.

예제

다음 코드 예제에서는 샘플 패키지를 로드 하 고이 열거형에서 값을 반환 하는 속성을 포함 하 여 Flags 일부 패키지 속성을 표시 합니다.

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);  
            }  
         }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace PackageInfoTest  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            '  The pkg variable points to a package  
            '  installed with the SSIS samples.  
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx"   

            Dim app As Application =  New Application()   
            Dim p1 As Package =  app.LoadPackage(pkg,Nothing)   
            p1.Description = "CalculatedColumns package"  

            app.SaveToDtsServer(p1, Nothing, "File System\myp1Package", "YOURSERVER")  
            Dim pInfos As PackageInfos =  app.GetDtsServerPackageInfos("File System","YOURSERVER")   
            Dim pinfo As PackageInfo  
            For Each 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)  
            Next  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

Package Information

CreationDate: 3/24/2008 5:21:51 PM

Flags: Package

Folder: File System

Name: myp1Package

적용 대상