Partager via


DTSPropertyKind Enumeration

Contains values that describe the type of property.

Espace de noms: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Syntaxe

'Déclaration
Public Enumeration DTSPropertyKind
public enum DTSPropertyKind
public enum class DTSPropertyKind
public enum DTSPropertyKind
public enum DTSPropertyKind

Members

Member name Description
Connection The property is a connection.
Other The property is not described by any of the available enumerations.
Sensitive The property is sensitive.
VariableReadOnly The property is a read-only variable.
VariableReadWrite The property is a read/write variable.

Exemple

The following code sample shows how to retrieve the property kind for a specific property.

static void Main(string[] args)
    {
        // The variable pkg points to the location
        // of the ExecuteProcess package sample 
        // that is installed with the SSIS samples.
        string packageFile = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";

        Application application = new Application();
        Package package = application.LoadPackage(packageFile, null);

        // Retrieve the information from the Properties collection.
        // Each item in the collection represents a property on the
        // object. This example reviews the properties of the 
        // Package object.

        DtsProperties properties = package.Properties;

        String propertyName;
        DTSPropertyKind propertyKind;
        String packagePath;
        TypeCode propertyType;

        foreach (DtsProperty property in properties)
        {
            propertyType = property.Type;
            propertyName = property.Name;
            propertyKind = property.PropertyKind;
            packagePath = property.GetPackagePath(package);
            Console.WriteLine("Property Type: {0}, Property Name: {1}, Property Kind: {2}, Package Path: {3} ", 
            propertyType, propertyName, propertyKind, packagePath);
        }
    }
Shared  Sub Main(ByVal args() As String)
        ' The variable pkg points to the location
        ' of the ExecuteProcess package sample 
        ' that is installed with the SSIS samples.
        Dim packageFile As String =  "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx" 
 
        Dim application As Application =  New Application() 
        Dim package As Package =  application.LoadPackage(packageFile,Nothing) 
 
        ' Retrieve the information from the Properties collection.
        ' Each item in the collection represents a property on the
        ' object. This example reviews the properties of the 
        ' Package object.
 
        Dim properties As DtsProperties = package.Properties 
 
        Dim propertyName As String
        Dim propertyKind As DTSPropertyKind
        Dim packagePath As String
        Dim propertyType As TypeCode
 
        Dim property As DtsProperty
        For Each property In properties
            propertyType = property.Type
            propertyName = property.Name
            propertyKind = property.PropertyKind
            packagePath = property.GetPackagePath(package)
            Console.WriteLine("Property Type: {0}, Property Name: {1}, Property Kind: {2}, Package Path: {3} ", 
            propertyType, propertyName, propertyKind, packagePath)
        Next
End Sub

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

Microsoft.SqlServer.Dts.Runtime Namespace