Export (0) Print
Expand All

Task Class

Defines an abstract class that implements the methods and properties common to all tasks in Integration Services. 


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

public abstract class Task : DtsObject, 

The Task type exposes the following members.

Protected methodTaskInitializes a new instance of the Task class.

Public propertyExecutionValueReturns a user-defined object. This field is read-only.
Public propertyVersion*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.

Public methodCanUpdate*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML.
Public methodEqualsDetermines whether two object instances are equal. (Inherited from DtsObject.)
Public methodExecuteRuns the task.
Protected methodFinalize (Inherited from Object.)
Public methodGetConnectionIDGets a String containing the ID of the connection.
Public methodGetConnectionNameGets a String containing the name of the connection.
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from DtsObject.)
Public methodGetType (Inherited from Object.)
Public methodInitializeTaskInitializes the properties associated with the task. This method is called by the runtime and is not used in code.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodUpdate*** Member deprecated; see Remarks. ***   This method updates the old package XML with the new package XML if CanUpdate is set to true.
Public methodValidateVerifies that the component is properly configured.

A package consists of one or more tasks. These tasks define units of work that are performed as part of copying and transforming data, communicating with other processes, and performing database management functions.

Inherits from DtsObject and IDTSManagedTask.

The following code example is a very simple task implementation for a custom task that inherits from Task.

using System;
using Microsoft.SqlServer.Dts.Runtime;

class MyTask : Task
    private int m_value = 123;

    public override DTExecResult Execute(Connections connections,
Variables variables, IDTSEvents events,
IDTSLogging log, int lastExecResult, DtsTransaction txn)
        return m_value;

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft