Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Building a DTS Custom Task from the ATL Custom Task Basic Template

Building a DTS Custom Task from the ATL Custom Task Basic Template

SQL Server 2000

Building a DTS Custom Task from the ATL Custom Task Basic Template

To build a custom task with a user interface, use the ATL custom task basic template. This template is included in Microsoft® SQL Server™ 2000 Data Transformation Services (DTS) sample programs. The basic template does not support a custom user interface. For more information about DTS samples, see DTS Programming Samples.

Installing the ATL Custom Task Basic Template

To install the ATL custom task basic template, do the following:

  1. Copy all the files in the DTSTaskBasicTemplate folder except DTSCuTsk.reg to C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Template\ATL\. This location will be different if Microsoft® Visual Studio® version 6.0 was not installed to the default location.

  2. Double-click DTSCuTsk.reg to run the file.
Building a Custom Task Framework from the Template

You can create an ATL component that includes a custom task class that does not support a user interface by using the Microsoft Visual C++® development environment.

To build a custom task framework from the template

  1. On the File menu, click New, and then click the Projects tab.

  2. Click ATL COM AppWizard, and then enter a project name and location.

    For this discussion, assume you entered DTSCusTskBasic for the project name.

  3. Click Dynamic Link Library (DLL), click Finish, and then in the New Project Information dialog box, click OK.

  4. On the Insert menu, click New ATL Object.

  5. On the ATL Object Wizard screen, click DTS Custom Objects, click DTS Task w/o UI, and then click Next.

  6. On the Names tab, enter a name into the Short Name box.

    For this discussion, assume you entered TaskNoUI. The wizard will fill in the other fields. The COM/Type field is the name that will appear in the Task menu of DTS Designer. You can change it from the default TaskNoUI Class.

  7. Click the Attributes tab, and then do the following:
    • Under Threading Model, click Both.

    • Under Interface, click Dual.

    • Under Aggregation, click No.

    • Select the Support ISupportErrorInfo check box.

The wizards will create files for the DTSCusTskBasic component and the TaskNoUI class and save them to the project location folder specified in Step 1.

If you build this custom task project from the Build/Build DTSCusTskBasic.dll menu before you add any custom code, Visual C++ installs a custom task that appears in the Task menu of DTS Designer and can be included in a DTS package. When added to a package, the task uses the DTS default icon and displays the DTS default property grid. However, this task will not perform any function when the package is run. For more information on implementing and testing a custom task, see Implementing and Testing a DTS Custom Task.

© 2015 Microsoft