Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

DTSObjectHostType Enumeration

 

Applies To: SQL Server 2016 Preview

Describes the type of container that is hosting the other task or container.

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

public enum DTSObjectHostType

Member nameDescription
ConnectionManager

The host is a connection manager.

ForEachEnumerator

The host is a Foreach enumerator.

LogProvider

The host is a log provider.

Task

The host is a task.

Legacy Code Example

The following code example creates a package and adds a Sequence container to it. A FileSystemTask is then added to the task host, and the HostType property is reviewed, returning a value from the DTSObjectHostType enumeration.

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

namespace Microsoft.SqlServer.SSIS.Samples
{
    class mySample
    {
        static void Main(string[] args)
        {
            Package package = new Package();
            Sequence seq = (Sequence)package.Executables.Add("STOCK:SEQUENCE");

            // Add a File System task.
            Executable eFileTask1 = seq.Executables.Add("STOCK:FileSystemTask");
            TaskHost thFileTask1 = eFileTask1 as TaskHost;

            // Use the TaskHost variable to find the DtsObjectHostType.
            DTSObjectHostType hType = thFileTask1.HostType;
            Console.WriteLine("Host Type: {0}", hType);
        }
    }
}

Sample Output:

Host Type: Task

Return to top

Community Additions

Show:
© 2015 Microsoft