Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IDTSPropertiesProvider.Properties Property

Gets a collection that contains DtsProperty objects that have properties and methods for use with the container.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
DtsProperties Properties { get; }

Property Value

Type: Microsoft.SqlServer.Dts.Runtime.DtsProperties
A DtsProperties collection that contains DtsProperty objects associated with the container.

One of the classes that implements the IDTSPropertiesProvider interface is the Package class. The following code example shows how the Package class returns a DtsProperties collection from the Properties method. The code example then iterates through the properties, displaying several values.

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 p1 = new Package();

           // 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 props = p1.Properties;
            String name;
            String path;
            TypeCode propType;

            foreach (DtsProperty prop in props)
                propType = prop.Type;
                name = prop.Name;
                path = prop.GetPackagePath(p1);
                Console.WriteLine("Name {0}, Type {1}, Package path{2}", name, propType, path);

Sample Output:

Name CertificateContext, Type Int64, Package path\Package.CertificateContext

Name CertificateObject, Type Object, Package path\Package.CertificateObject

Name CheckpointFileName, Type String, Package path\Package.CheckpointFileName

Name CheckpointUsage, Type Object, Package path\Package.CheckpointUsage

Name CheckSignatureOnLoad, Type Boolean, Package path\Package.CheckSignatureOnLoad

Name Configurations, Type Object, Package path\Package.Configurations

Name Connections, Type Object, Package path\Package.Connections

Name CreationDate, Type DateTime, Package path\Package.CreationDate

Name CreationName, Type String, Package path\Package.CreationName

Name CreatorComputerName, Type String, Package path\Package.CreatorComputerName

Name CreatorName, Type String, Package path\Package.CreatorName

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.