Click to Rate and Give Feedback

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
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)
Visual Basic (Declaration)
Public MustInherit Class Task
    Inherits DtsObject
    Implements IDTSManagedTask
C#
public abstract class Task : DtsObject, IDTSManagedTask
C++
public ref class Task abstract : public DtsObject, IDTSManagedTask
J#
public abstract class Task extends DtsObject implements IDTSManagedTask
JScript
public abstract class Task extends DtsObject implements IDTSManagedTask

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.


System.Object
   Microsoft.SqlServer.Dts.Runtime.DtsObject
    Microsoft.SqlServer.Dts.Runtime.Task
       Derived Classes

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

C#
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;
    }
}
Visual Basic
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
 
Class MyTask
    Inherits Task
    Private m_value As Integer =  123 
    Public Overrides DTExecResult Property connections,() As Execute(Connections
    End Property
Variables variables, IDTSEvents events,
IDTSLogging log,int Function txn)() As lastExecResult,DtsTransaction
        Return m_value
End Function
End Class
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker