0 out of 3 rated this helpful - Rate this topic

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, IDTSManagedTask
public abstract class Task extends DtsObject implements IDTSManagedTask
public abstract class Task extends DtsObject implements IDTSManagedTask

Updated sample code: 17 July 2006

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.

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 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 2005.

Target Platforms

Release

History

17 July 2006

Changed content:
  • Modified code sample.

  • Fixed typo in constructor.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.